From dbf485e0d5100d3b6433be070de2fb912582a9bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E6=B3=BD=E5=86=9B?= <5654792+tcubic21@user.noreply.gitee.com> Date: Fri, 7 Mar 2025 10:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development.example | 3 + .env.production.example | 3 + .eslintrc.js | 39 + .gitignore | 31 + .vscode/extensions.json | 3 + .vscode/settings.json | 11 + index.html | 21 + initialize.js | 1 + my-release-key.keystore | Bin 0 -> 2851 bytes package.json | 108 + scripts/develop.js | 105 + scripts/publish.js | 1 + scripts/release.mjs | 46 + src/App.vue | 76 + src/androidPrivacy.json | 40 + src/api/account.ts | 74 + src/api/app.ts | 48 + src/api/chat.ts | 130 + src/api/drawing.ts | 1 + src/api/member.ts | 17 + src/api/news.ts | 52 + src/api/pay.ts | 16 + src/api/promotion.ts | 55 + src/api/qrcode.ts | 60 + src/api/recharge.ts | 21 + src/api/redeem_code.ts | 1 + src/api/shop.ts | 16 + src/api/square.ts | 1 + src/api/task.ts | 25 + src/api/user.ts | 58 + src/components/agreement/agreement.vue | 1 + src/components/audio-play/audio-play.vue | 135 + .../avatar-upload/avatar-upload.vue | 111 + src/components/chat-plugins/chat-plugins.vue | 166 + src/components/chat-plugins/vip-use.vue | 61 + .../chat-record-item/chat-record-item.vue | 305 + .../chat-record-item/record-file.vue | 49 + .../chat-record-item/record-image.vue | 34 + src/components/chat-record-item/text-item.vue | 91 + .../chat-scroll-view/chat-scroll-view.vue | 865 ++ .../chat-scroll-view/components/app-chat.vue | 148 + .../components/online-voice.vue | 431 + .../components/request/http.ts | 202 + .../components/request/index.ts | 13 + .../components/request/type.d.ts | 44 + .../dialog-poster/dialog-poster.vue | 385 + .../dragon-button/dragon-button.vue | 150 + src/components/drop-down/drop-down.vue | 1 + src/components/file-upload/choose-file.ts | 247 + src/components/file-upload/file-upload.vue | 394 + .../floating-menu/floating-menu.vue | 286 + src/components/guided-popup/guided-popup.vue | 94 + src/components/l-textarea/l-textarea.vue | 90 + src/components/loading/loading.vue | 66 + src/components/model-picker/model-picker.vue | 285 + .../network-switch/network-switch.vue | 69 + src/components/notice-popup/notice-popup.vue | 1 + src/components/page-status/page-status.vue | 68 + src/components/payment/check.vue | 1 + src/components/payment/payment.vue | 327 + src/components/price/price.vue | 126 + src/components/recorder/recorder.vue | 293 + src/components/tabbar/tabbar.vue | 92 + .../ua-markdown/css/markdown-style.css | 367 + .../lib/highlight/atom-one-dark.css | 1 + .../lib/highlight/atom-one-light.css | 1 + .../lib/highlight/github-dark.min.css | 10 + src/components/ua-markdown/lib/html-parser.js | 352 + .../ua-markdown/lib/markdown-it.min.js | 2 + src/components/ua-markdown/ua-markdown.vue | 145 + src/components/widgets/banner/banner.vue | 48 + .../customer-service/customer-service.vue | 89 + .../widgets/my-service/my-service.vue | 79 + src/components/widgets/nav/nav.vue | 38 + src/components/widgets/search/search.vue | 13 + .../widgets/user-banner/user-banner.vue | 49 + .../widgets/user-bottom/user-bottom.vue | 1 + .../widgets/user-info/user-info.vue | 106 + src/components/widgets/user-vip/user-vip.vue | 96 + src/config/index.ts | 23 + src/enums/agreementEnums.ts | 5 + src/enums/appEnums.ts | 50 + src/enums/cacheEnums.ts | 9 + src/enums/constantEnums.ts | 27 + src/enums/requestEnums.ts | 34 + src/hooks/useAudio.ts | 87 + src/hooks/useAudioPlay.ts | 189 + src/hooks/useCaptchaEffect.ts | 27 + src/hooks/useCopy.ts | 10 + src/hooks/useLockFn.ts | 21 + src/hooks/usePolling.ts | 1 + src/hooks/useRecorder.ts | 672 + src/hooks/useShareMessage.ts | 176 + src/hooks/useTouch.ts | 72 + src/lib/fft.js | 114 + src/lib/html2canvas.esm.js | 10943 ++++++++++++++++ src/main.ts | 15 + src/manifest.json | 172 + src/mixins/index.ts | 7 + src/mixins/setTitle.ts | 8 + src/mixins/share.ts | 64 + src/mixins/theme.ts | 18 + .../creation-history-item.vue | 158 + .../form-designer/form-designer.vue | 127 + .../form-designer/widgets/checkbox.vue | 81 + .../form-designer/widgets/input.vue | 59 + .../form-designer/widgets/radio.vue | 70 + .../form-designer/widgets/select.vue | 87 + .../form-designer/widgets/textarea.vue | 77 + .../components/model-picker/model-picker.vue | 289 + src/packages/components/tab/tab.vue | 84 + src/packages/components/tabs/tabs.vue | 437 + src/packages/components/uploader/uploader.vue | 187 + src/packages/pages/404/404.vue | 31 + src/packages/pages/agreement/agreement.vue | 44 + .../pages/article_detail/article_detail.vue | 132 + .../pages/article_list/article_list.vue | 62 + .../article_list/component/news-card.vue | 65 + .../article_list/component/news-list.vue | 66 + src/packages/pages/as_us/as_us.vue | 54 + .../pages/cancelaccount/cancelaccount.vue | 67 + .../pages/change_password/change_password.vue | 87 + src/packages/pages/chat/chat.vue | 122 + src/packages/pages/collection/collection.vue | 106 + src/packages/pages/create/create.vue | 548 + .../pages/create_history/create_history.vue | 192 + .../customer_service/customer_service.vue | 31 + .../distribution_order/distribution_order.vue | 111 + .../component/component/app-split-com.vue | 117 + .../component/component/share-square.vue | 102 + .../components/keyword-suggestion.vue | 292 + .../drawing-control/dalle3-picture-size.vue | 143 + .../drawing-control/dalle3-size-type.vue | 75 + .../drawing-control/dalle3-style-picker.vue | 1 + .../drawing-control/disclaimer-modal.vue | 1 + .../drawing-control/generation-picker.vue | 227 + .../component/drawing-control/index.vue | 269 + .../drawing-control/model-picker.vue | 172 + .../drawing-control/negative-prompt.vue | 1 + .../drawing-control/other-prompt.vue | 1 + .../drawing-control/picture-size.vue | 137 + .../drawing-control/prompt-txt2img.vue | 150 + .../drawing-control/reference-image.vue | 1 + .../drawing-control/sd-model-picker.vue | 1 + .../drawing-control/sd-picture-size.vue | 152 + .../drawing-control/yj-model-picker.vue | 192 + .../drawing-control/yj-picture-size.vue | 149 + .../drawing-record/components/fail.vue | 90 + .../drawing-record/components/in-progress.vue | 65 + .../drawing-record/components/index.vue | 1 + .../drawing-record/components/picture.vue | 107 + .../drawing-record/components/success.vue | 491 + .../component/drawing-record/index.vue | 1 + .../component/drawing-record/paging.vue | 1 + src/packages/pages/drawing/drawing.vue | 112 + .../pages/drawing/hooks/useConfigEffect.ts | 1 + .../pages/drawing/hooks/useIndexEffect.ts | 1 + src/packages/pages/drawing/hooks/useSplit.ts | 142 + .../pages/earnings_detail/earnings_detail.vue | 133 + .../pages/enlarge_user/enlarge_user.vue | 44 + src/packages/pages/feedback/feedback.vue | 83 + .../pages/follow_official/follow_official.vue | 35 + src/packages/pages/forget_pwd/forget_pwd.vue | 221 + .../invite_poster/component/invite-poster.vue | 195 + .../pages/invite_poster/invite_poster.vue | 193 + .../mind_map/components/control-popup.vue | 198 + .../mind_map/components/mind-map-history.vue | 130 + src/packages/pages/mind_map/mind_map.vue | 75 + src/packages/pages/mind_map/webview.vue | 317 + src/packages/pages/open_vip/open_vip.vue | 877 ++ .../promotion_center/components/apply.vue | 121 + .../promotion_center/components/content.vue | 154 + .../promotion_center/promotion_center.vue | 117 + .../components/custom-code-type.vue | 1 + .../components/custom-keyword.vue | 1 + .../components/custom-model-picker.vue | 1 + .../components/custom-picture-size.vue | 1 + .../components/custom-version-picker.vue | 1 + .../qrcode-control/components/images/1.png | Bin 0 -> 421 bytes .../qrcode-control/components/images/2.png | Bin 0 -> 302 bytes .../qrcode-control/components/images/3.png | Bin 0 -> 953 bytes .../qrcode-control/components/images/4.png | Bin 0 -> 372 bytes .../qrcode-control/components/images/5.png | Bin 0 -> 407 bytes .../qrcode-control/components/images/6.png | Bin 0 -> 619 bytes .../qrcode-control/components/images/7.png | Bin 0 -> 489 bytes .../components/mewx-template.vue | 1 + .../components/pixel-style-type.vue | 55 + .../components/qrcode-display.vue | 1 + .../components/reference-image.vue | 1 + .../components/zhishuyun-template.vue | 77 + .../qrcode-control/generation-mode.vue | 1 + .../qrcode-control/generation-picker.vue | 71 + .../qrcode-control/generation-type.vue | 65 + .../qrcode/component/qrcode-control/index.vue | 242 + .../qrcode-record/components/fail.vue | 59 + .../qrcode-record/components/in-progress.vue | 1 + .../qrcode-record/components/index.vue | 1 + .../qrcode-record/components/picture.vue | 64 + .../qrcode-record/components/success.vue | 123 + .../qrcode/component/qrcode-record/index.vue | 1 + .../qrcode/component/qrcode-record/paging.vue | 1 + .../pages/qrcode/enums/qrcodeEnums.ts | 1 + src/packages/pages/qrcode/hooks/type.d.ts | 1 + .../pages/qrcode/hooks/useConfigEffect.ts | 60 + .../pages/qrcode/hooks/useIndexEffect.ts | 267 + src/packages/pages/qrcode/qrcode.vue | 116 + src/packages/pages/recharge/recharge.vue | 300 + .../pages/recharge_record/recharge_record.vue | 48 + .../pages/redeem_code/redeem_code.vue | 164 + src/packages/pages/register/register.vue | 260 + src/packages/pages/square/component/lists.vue | 268 + .../pages/square/component/poster.vue | 305 + .../pages/square/component/preview.vue | 351 + src/packages/pages/square/square.vue | 151 + .../pages/task_center/task_center.vue | 328 + src/packages/pages/team_fans/team_fans.vue | 150 + src/packages/pages/user_data/user_data.vue | 425 + src/packages/pages/user_set/user_set.vue | 231 + .../pages/user_wallet/user_wallet.vue | 122 + .../pages/withdraw/component/acount-full.vue | 1 + src/packages/pages/withdraw/withdraw.vue | 273 + .../pages/withdraw_record/withdraw_record.vue | 93 + src/packages/static/empty/create_record.png | Bin 0 -> 6157 bytes .../static/empty/distribute_center.png | Bin 0 -> 4541 bytes .../static/empty/distribute_order.png | Bin 0 -> 10032 bytes src/packages/static/empty/error.png | Bin 0 -> 31165 bytes src/packages/static/empty/no_login.png | Bin 0 -> 14241 bytes src/packages/static/empty/team_fans.png | Bin 0 -> 3856 bytes src/packages/static/empty/withdraw.png | Bin 0 -> 2937 bytes src/packages/static/images/cancel.png | Bin 0 -> 3836 bytes .../static/images/commission_details.png | Bin 0 -> 4839 bytes src/packages/static/images/coupon_bg.png | Bin 0 -> 17050 bytes src/packages/static/images/delete.png | Bin 0 -> 3087 bytes .../static/images/distribution_orders.png | Bin 0 -> 3625 bytes src/packages/static/images/draw_upload.png | Bin 0 -> 1066 bytes src/packages/static/images/drawing/1.png | Bin 0 -> 115 bytes src/packages/static/images/drawing/2.png | Bin 0 -> 119 bytes src/packages/static/images/drawing/3.png | Bin 0 -> 117 bytes src/packages/static/images/drawing/4.png | Bin 0 -> 117 bytes src/packages/static/images/drawing/5.png | Bin 0 -> 117 bytes src/packages/static/images/drawing/6.png | Bin 0 -> 115 bytes .../static/images/drawing/background.png | Bin 0 -> 37100 bytes src/packages/static/images/drawing/dict.png | Bin 0 -> 1703 bytes src/packages/static/images/drawing/empty.png | Bin 0 -> 13279 bytes src/packages/static/images/drawing/error.png | Bin 0 -> 3482 bytes src/packages/static/images/drawing/random.png | Bin 0 -> 3571 bytes .../static/images/drawing/translate.png | Bin 0 -> 1769 bytes .../static/images/export_download.png | Bin 0 -> 1677 bytes src/packages/static/images/invite_friends.png | Bin 0 -> 4134 bytes src/packages/static/images/isSelectPay.png | Bin 0 -> 3033 bytes src/packages/static/images/money_bg.png | Bin 0 -> 5285 bytes src/packages/static/images/poster.png | Bin 0 -> 664 bytes src/packages/static/images/praise.png | Bin 0 -> 22424 bytes src/packages/static/images/praise02.png | Bin 0 -> 39295 bytes .../static/images/recharge_success.png | Bin 0 -> 3036 bytes src/packages/static/images/square/error.png | Bin 0 -> 9188 bytes .../static/images/square/icon_copy.png | Bin 0 -> 583 bytes .../static/images/square/icon_save.png | Bin 0 -> 380 bytes src/packages/static/images/square/loading.png | Bin 0 -> 8727 bytes src/packages/static/images/team_fans.png | Bin 0 -> 3933 bytes src/packages/static/images/vip_bg.png | Bin 0 -> 19485 bytes src/pages.json | 461 + src/pages/ai_creation/ai_creation.vue | 112 + src/pages/app/app.vue | 130 + src/pages/empty/empty.vue | 7 + .../index/components/follow-official.vue | 1 + .../index/components/ios-privacy-popup.vue | 168 + .../index/components/mp-privacy-popup.vue | 1 + .../components/problem-example-popup.vue | 1 + .../index/components/problem-example.vue | 66 + src/pages/index/components/session-item.vue | 1 + src/pages/index/components/session-popup.vue | 1 + src/pages/index/components/session.vue | 1 + src/pages/index/components/useSessionList.ts | 1 + src/pages/index/index.vue | 177 + src/pages/login/components/bind-mobile.vue | 1 + src/pages/login/components/mailbox.vue | 121 + src/pages/login/components/mobile.vue | 1 + .../login/components/update-user-info.vue | 1 + src/pages/login/components/weixin.vue | 1 + src/pages/login/login.vue | 373 + src/pages/pc_login/pc_login.vue | 64 + src/pages/skills/skills.vue | 167 + src/pages/user/user.vue | 62 + src/pages/webview/webview.vue | 16 + src/plugins/index.ts | 12 + src/plugins/modules/pinia.ts | 6 + src/plugins/modules/uview.ts | 7 + src/plugins/modules/vconsole.ts | 14 + src/router/index.ts | 101 + src/static/images/chat_plugins/plugins.png | Bin 0 -> 600 bytes src/static/images/chat_plugins/unuse.png | Bin 0 -> 424 bytes src/static/images/common/bubble_bg.png | Bin 0 -> 1822 bytes src/static/images/common/icon_copy.png | Bin 0 -> 966 bytes src/static/images/common/icon_cutout.png | Bin 0 -> 414 bytes src/static/images/common/icon_delete.png | Bin 0 -> 321 bytes src/static/images/common/icon_download.png | Bin 0 -> 287 bytes src/static/images/common/icon_reload.png | Bin 0 -> 645 bytes src/static/images/common/icon_share.png | Bin 0 -> 386 bytes src/static/images/common/robot_avatar.png | Bin 0 -> 2227 bytes src/static/images/common/translate.png | Bin 0 -> 275 bytes src/static/images/common/user_avatar.png | Bin 0 -> 3016 bytes src/static/images/floating_menu/back.png | Bin 0 -> 618 bytes src/static/images/floating_menu/home.png | Bin 0 -> 747 bytes src/static/images/floating_menu/unfold.png | Bin 0 -> 432 bytes src/static/images/floating_menu/user.png | Bin 0 -> 1000 bytes src/static/images/icon/icon_code.png | Bin 0 -> 2051 bytes src/static/images/icon/icon_copy.png | Bin 0 -> 410 bytes src/static/images/icon/icon_doc.png | Bin 0 -> 1031 bytes src/static/images/icon/icon_email.png | Bin 0 -> 1288 bytes src/static/images/icon/icon_home.png | Bin 0 -> 771 bytes src/static/images/icon/icon_member.png | Bin 0 -> 1534 bytes src/static/images/icon/icon_mobile.png | Bin 0 -> 679 bytes src/static/images/icon/icon_password.png | Bin 0 -> 1119 bytes src/static/images/icon/icon_phone.png | Bin 0 -> 3354 bytes src/static/images/icon/icon_unselect.png | Bin 0 -> 943 bytes src/static/images/icon/icon_upload.png | Bin 0 -> 1460 bytes src/static/images/icon/icon_user.png | Bin 0 -> 1640 bytes src/static/images/icon/icon_visit.png | Bin 0 -> 3135 bytes src/static/images/icon/icon_wx.png | Bin 0 -> 1638 bytes src/static/images/payment/icon_succeed.png | Bin 0 -> 1342 bytes src/static/images/payment/icon_waiting.png | Bin 0 -> 1462 bytes src/static/images/user/default_avatar.png | Bin 0 -> 1174 bytes src/static/images/user/my_topbg.png | Bin 0 -> 13034 bytes src/static/images/user/user_bg.png | Bin 0 -> 10835 bytes src/static/images/user/user_vip.png | Bin 0 -> 3403 bytes src/stores/androidPermissions.ts | 209 + src/stores/app.ts | 43 + src/stores/navigationBarTitle.ts | 38 + src/stores/theme.ts | 49 + src/stores/user.ts | 43 + src/styles/index.scss | 3 + src/styles/public.scss | 15 + src/styles/tailwind.css | 5 + src/styles/var.css | 0 src/typings/env.d.ts | 12 + src/typings/router.d.ts | 10 + src/typings/uni.d.ts | 3 + src/typings/vue.d.ts | 12 + src/uni.scss | 41 + src/uni_modules/lime-painter/changelog.md | 182 + .../components/common/relation.js | 147 + .../l-painter-image/l-painter-image.vue | 27 + .../l-painter-qrcode/l-painter-qrcode.vue | 26 + .../l-painter-text/l-painter-text.vue | 28 + .../l-painter-view/l-painter-view.vue | 29 + .../components/l-painter/l-painter.vue | 443 + .../lime-painter/components/l-painter/nvue.js | 219 + .../components/l-painter/painter.js | 1 + .../components/l-painter/props.js | 51 + .../components/l-painter/utils.js | 495 + .../components/lime-painter/index.vue | 2 + .../components/lime-painter/lime-painter.vue | 217 + src/uni_modules/lime-painter/package.json | 92 + src/uni_modules/lime-painter/readme.md | 927 ++ .../lime-painter/static/index.html | 119 + .../lime-painter/static/painter.js | 1 + .../lime-painter/static/uni.webview.1.5.3.js | 1 + src/uni_modules/mp-html/README.md | 193 + src/uni_modules/mp-html/changelog.md | 129 + .../mp-html/components/mp-html/mp-html.vue | 498 + .../mp-html/components/mp-html/node/node.vue | 417 + .../mp-html/components/mp-html/parser.js | 1335 ++ src/uni_modules/mp-html/package.json | 76 + .../static/app-plus/mp-html/js/handler.js | 1 + .../app-plus/mp-html/js/uni.webview.min.js | 1 + .../static/app-plus/mp-html/local.html | 1 + src/uni_modules/vk-uview-ui/changelog.md | 118 + .../u-action-sheet/u-action-sheet.vue | 246 + .../components/u-alert-tips/u-alert-tips.vue | 257 + .../u-avatar-cropper/u-avatar-cropper.vue | 290 + .../components/u-avatar-cropper/weCropper.js | 1261 ++ .../components/u-avatar/u-avatar.vue | 263 + .../components/u-back-top/u-back-top.vue | 153 + .../components/u-badge/u-badge.vue | 216 + .../components/u-button/u-button.vue | 602 + .../components/u-calendar/u-calendar.vue | 663 + .../u-car-keyboard/u-car-keyboard.vue | 267 + .../vk-uview-ui/components/u-card/u-card.vue | 300 + .../components/u-cell-group/u-cell-group.vue | 70 + .../components/u-cell-item/u-cell-item.vue | 317 + .../u-checkbox-group/u-checkbox-group.vue | 178 + .../components/u-checkbox/u-checkbox.vue | 322 + .../u-circle-progress/u-circle-progress.vue | 220 + .../vk-uview-ui/components/u-col/u-col.vue | 156 + .../u-collapse-item/u-collapse-item.vue | 205 + .../components/u-collapse/u-collapse.vue | 100 + .../u-column-notice/u-column-notice.vue | 238 + .../components/u-count-down/u-count-down.vue | 175 + .../components/u-count-down/utils.js | 62 + .../components/u-count-to/u-count-to.vue | 266 + .../components/u-divider/u-divider.vue | 153 + .../u-dropdown-item/u-dropdown-item.vue | 166 + .../components/u-dropdown/u-dropdown.vue | 299 + .../components/u-empty/u-empty.vue | 193 + .../components/u-field/u-field.vue | 402 + .../components/u-form-item/u-form-item.vue | 507 + .../vk-uview-ui/components/u-form/u-form.vue | 148 + .../u-full-screen/u-full-screen.vue | 52 + .../vk-uview-ui/components/u-gap/u-gap.vue | 54 + .../components/u-grid-item/u-grid-item.vue | 127 + .../vk-uview-ui/components/u-grid/u-grid.vue | 109 + .../vk-uview-ui/components/u-icon/u-icon.vue | 369 + .../components/u-image/u-image.vue | 267 + .../u-index-anchor/u-index-anchor.vue | 89 + .../components/u-index-list/u-index-list.vue | 315 + .../components/u-input/u-input.vue | 470 + .../components/u-keyboard/u-keyboard.vue | 285 + .../components/u-lazy-load/u-lazy-load.vue | 254 + .../u-line-progress/u-line-progress.vue | 147 + .../vk-uview-ui/components/u-line/u-line.vue | 84 + .../vk-uview-ui/components/u-link/u-link.vue | 89 + .../u-loading-page/u-loading-page.vue | 25 + .../components/u-loading/u-loading.vue | 103 + .../components/u-loadmore/u-loadmore.vue | 204 + .../vk-uview-ui/components/u-mask/u-mask.vue | 137 + .../u-message-input/u-message-input.vue | 327 + .../components/u-modal/u-modal.vue | 336 + .../components/u-navbar/u-navbar.vue | 315 + .../components/u-no-network/u-no-network.vue | 233 + .../components/u-notice-bar/u-notice-bar.vue | 273 + .../components/u-number-box/u-number-box.vue | 476 + .../u-number-keyboard/u-number-keyboard.vue | 170 + .../components/u-picker/u-picker.vue | 892 ++ .../components/u-popup/u-popup.vue | 477 + .../u-radio-group/u-radio-group.vue | 176 + .../components/u-radio/u-radio.vue | 276 + .../vk-uview-ui/components/u-rate/u-rate.vue | 293 + .../components/u-read-more/u-read-more.vue | 181 + .../components/u-row-notice/u-row-notice.vue | 270 + .../vk-uview-ui/components/u-row/u-row.vue | 84 + .../components/u-search/u-search.vue | 357 + .../components/u-section/u-section.vue | 154 + .../components/u-select/u-select.vue | 437 + .../components/u-skeleton/u-skeleton.vue | 199 + .../components/u-slider/u-slider.vue | 290 + .../components/u-steps/u-steps.vue | 200 + .../components/u-sticky/u-sticky.vue | 169 + .../components/u-subsection/u-subsection.vue | 362 + .../u-swipe-action/u-swipe-action.vue | 257 + .../components/u-swiper/u-swiper.vue | 341 + .../components/u-switch/u-switch.vue | 191 + .../components/u-tabbar/u-tabbar.vue | 385 + .../components/u-table/u-table.vue | 85 + .../u-tabs-swiper/u-tabs-swiper.vue | 489 + .../vk-uview-ui/components/u-tabs/u-tabs.vue | 406 + .../vk-uview-ui/components/u-tag/u-tag.vue | 294 + .../vk-uview-ui/components/u-td/u-td.vue | 66 + .../vk-uview-ui/components/u-th/u-th.vue | 62 + .../u-time-line-item/u-time-line-item.vue | 83 + .../components/u-time-line/u-time-line.vue | 43 + .../components/u-toast/u-toast.vue | 220 + .../components/u-top-tips/u-top-tips.vue | 121 + .../vk-uview-ui/components/u-tr/u-tr.vue | 25 + .../components/u-upload/u-upload.vue | 724 + .../u-verification-code.vue | 175 + .../components/u-waterfall/u-waterfall.vue | 201 + .../components/vk-uview-ui/vk-uview-ui.vue | 15 + src/uni_modules/vk-uview-ui/iconfont.css | 910 ++ src/uni_modules/vk-uview-ui/index.js | 146 + src/uni_modules/vk-uview-ui/index.scss | 23 + .../vk-uview-ui/libs/address/areas.json | 1 + .../vk-uview-ui/libs/address/citys.json | 1 + .../vk-uview-ui/libs/address/provinces.json | 1 + .../vk-uview-ui/libs/config/config.js | 15 + .../vk-uview-ui/libs/config/zIndex.js | 20 + .../vk-uview-ui/libs/css/color.scss | 155 + .../vk-uview-ui/libs/css/common.scss | 176 + .../libs/css/style.components.scss | 7 + .../vk-uview-ui/libs/css/style.h5.scss | 8 + .../vk-uview-ui/libs/css/style.mp.scss | 72 + .../vk-uview-ui/libs/css/style.nvue.scss | 3 + .../vk-uview-ui/libs/css/style.vue.scss | 175 + .../vk-uview-ui/libs/function/$parent.js | 18 + .../vk-uview-ui/libs/function/addUnit.js | 8 + .../vk-uview-ui/libs/function/bem.js | 4 + .../vk-uview-ui/libs/function/color.js | 37 + .../libs/function/colorGradient.js | 134 + .../vk-uview-ui/libs/function/debounce.js | 29 + .../vk-uview-ui/libs/function/deepClone.js | 23 + .../vk-uview-ui/libs/function/deepMerge.js | 30 + .../vk-uview-ui/libs/function/getParent.js | 47 + .../vk-uview-ui/libs/function/guid.js | 41 + .../vk-uview-ui/libs/function/md5.js | 385 + .../vk-uview-ui/libs/function/queryParams.js | 58 + .../vk-uview-ui/libs/function/random.js | 10 + .../vk-uview-ui/libs/function/randomArray.js | 7 + .../vk-uview-ui/libs/function/route.js | 122 + .../vk-uview-ui/libs/function/sys.js | 9 + .../vk-uview-ui/libs/function/test.js | 232 + .../vk-uview-ui/libs/function/throttle.js | 34 + .../vk-uview-ui/libs/function/timeFormat.js | 51 + .../vk-uview-ui/libs/function/timeFrom.js | 47 + .../vk-uview-ui/libs/function/toast.js | 9 + .../vk-uview-ui/libs/function/trim.js | 15 + .../vk-uview-ui/libs/function/type2icon.js | 35 + .../vk-uview-ui/libs/mixin/mixin.js | 86 + .../vk-uview-ui/libs/mixin/mpShare.js | 18 + .../vk-uview-ui/libs/request/index.js | 169 + .../vk-uview-ui/libs/store/index.js | 19 + .../vk-uview-ui/libs/util/async-validator.js | 1356 ++ .../vk-uview-ui/libs/util/emitter.js | 64 + src/uni_modules/vk-uview-ui/package.json | 82 + src/uni_modules/vk-uview-ui/readme.md | 125 + src/uni_modules/vk-uview-ui/theme.scss | 38 + src/utils/auth.ts | 6 + src/utils/cache.ts | 50 + src/utils/client.ts | 66 + src/utils/date.ts | 99 + src/utils/device/vibrate.ts | 15 + src/utils/env.ts | 22 + src/utils/file.ts | 20 + src/utils/html2canvas.ts | 57 + src/utils/imgPath.js | 243 + src/utils/pay/alipay.ts | 65 + src/utils/pay/balance.ts | 11 + src/utils/pay/index.ts | 21 + src/utils/pay/pay.ts | 29 + src/utils/pay/wechat.ts | 107 + src/utils/request/cancel.ts | 29 + src/utils/request/http.ts | 348 + src/utils/request/index.ts | 137 + src/utils/request/type.d.ts | 42 + src/utils/theme.ts | 53 + src/utils/util.ts | 214 + src/utils/validate.ts | 17 + src/utils/wechat.ts | 201 + tailwind.config.js | 74 + tsconfig.json | 28 + typings/env.d.ts | 14 + typings/router.d.ts | 10 + typings/uni.d.ts | 5 + typings/vue.d.ts | 12 + unpackage/res/icons/1024x1024.png | Bin 0 -> 52776 bytes unpackage/res/icons/120x120.png | Bin 0 -> 3210 bytes unpackage/res/icons/144x144.png | Bin 0 -> 4241 bytes unpackage/res/icons/152x152.png | Bin 0 -> 4520 bytes unpackage/res/icons/167x167.png | Bin 0 -> 5031 bytes unpackage/res/icons/180x180.png | Bin 0 -> 5014 bytes unpackage/res/icons/192x192.png | Bin 0 -> 5673 bytes unpackage/res/icons/20x20.png | Bin 0 -> 570 bytes unpackage/res/icons/29x29.png | Bin 0 -> 778 bytes unpackage/res/icons/40x40.png | Bin 0 -> 1082 bytes unpackage/res/icons/58x58.png | Bin 0 -> 1595 bytes unpackage/res/icons/60x60.png | Bin 0 -> 1618 bytes unpackage/res/icons/72x72.png | Bin 0 -> 1939 bytes unpackage/res/icons/76x76.png | Bin 0 -> 2165 bytes unpackage/res/icons/80x80.png | Bin 0 -> 2033 bytes unpackage/res/icons/87x87.png | Bin 0 -> 2310 bytes unpackage/res/icons/96x96.png | Bin 0 -> 2564 bytes vite.config.ts | 43 + yarn.lock | 7602 +++++++++++ 552 files changed, 81015 insertions(+) create mode 100644 .env.development.example create mode 100644 .env.production.example create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 index.html create mode 100644 initialize.js create mode 100644 my-release-key.keystore create mode 100644 package.json create mode 100644 scripts/develop.js create mode 100644 scripts/publish.js create mode 100644 scripts/release.mjs create mode 100644 src/App.vue create mode 100644 src/androidPrivacy.json create mode 100644 src/api/account.ts create mode 100644 src/api/app.ts create mode 100644 src/api/chat.ts create mode 100644 src/api/drawing.ts create mode 100644 src/api/member.ts create mode 100644 src/api/news.ts create mode 100644 src/api/pay.ts create mode 100644 src/api/promotion.ts create mode 100644 src/api/qrcode.ts create mode 100644 src/api/recharge.ts create mode 100644 src/api/redeem_code.ts create mode 100644 src/api/shop.ts create mode 100644 src/api/square.ts create mode 100644 src/api/task.ts create mode 100644 src/api/user.ts create mode 100644 src/components/agreement/agreement.vue create mode 100644 src/components/audio-play/audio-play.vue create mode 100644 src/components/avatar-upload/avatar-upload.vue create mode 100644 src/components/chat-plugins/chat-plugins.vue create mode 100644 src/components/chat-plugins/vip-use.vue create mode 100644 src/components/chat-record-item/chat-record-item.vue create mode 100644 src/components/chat-record-item/record-file.vue create mode 100644 src/components/chat-record-item/record-image.vue create mode 100644 src/components/chat-record-item/text-item.vue create mode 100644 src/components/chat-scroll-view/chat-scroll-view.vue create mode 100644 src/components/chat-scroll-view/components/app-chat.vue create mode 100644 src/components/chat-scroll-view/components/online-voice.vue create mode 100644 src/components/chat-scroll-view/components/request/http.ts create mode 100644 src/components/chat-scroll-view/components/request/index.ts create mode 100644 src/components/chat-scroll-view/components/request/type.d.ts create mode 100644 src/components/dialog-poster/dialog-poster.vue create mode 100644 src/components/dragon-button/dragon-button.vue create mode 100644 src/components/drop-down/drop-down.vue create mode 100644 src/components/file-upload/choose-file.ts create mode 100644 src/components/file-upload/file-upload.vue create mode 100644 src/components/floating-menu/floating-menu.vue create mode 100644 src/components/guided-popup/guided-popup.vue create mode 100644 src/components/l-textarea/l-textarea.vue create mode 100644 src/components/loading/loading.vue create mode 100644 src/components/model-picker/model-picker.vue create mode 100644 src/components/network-switch/network-switch.vue create mode 100644 src/components/notice-popup/notice-popup.vue create mode 100644 src/components/page-status/page-status.vue create mode 100644 src/components/payment/check.vue create mode 100644 src/components/payment/payment.vue create mode 100644 src/components/price/price.vue create mode 100644 src/components/recorder/recorder.vue create mode 100644 src/components/tabbar/tabbar.vue create mode 100644 src/components/ua-markdown/css/markdown-style.css create mode 100644 src/components/ua-markdown/lib/highlight/atom-one-dark.css create mode 100644 src/components/ua-markdown/lib/highlight/atom-one-light.css create mode 100644 src/components/ua-markdown/lib/highlight/github-dark.min.css create mode 100644 src/components/ua-markdown/lib/html-parser.js create mode 100644 src/components/ua-markdown/lib/markdown-it.min.js create mode 100644 src/components/ua-markdown/ua-markdown.vue create mode 100644 src/components/widgets/banner/banner.vue create mode 100644 src/components/widgets/customer-service/customer-service.vue create mode 100644 src/components/widgets/my-service/my-service.vue create mode 100644 src/components/widgets/nav/nav.vue create mode 100644 src/components/widgets/search/search.vue create mode 100644 src/components/widgets/user-banner/user-banner.vue create mode 100644 src/components/widgets/user-bottom/user-bottom.vue create mode 100644 src/components/widgets/user-info/user-info.vue create mode 100644 src/components/widgets/user-vip/user-vip.vue create mode 100644 src/config/index.ts create mode 100644 src/enums/agreementEnums.ts create mode 100644 src/enums/appEnums.ts create mode 100644 src/enums/cacheEnums.ts create mode 100644 src/enums/constantEnums.ts create mode 100644 src/enums/requestEnums.ts create mode 100644 src/hooks/useAudio.ts create mode 100644 src/hooks/useAudioPlay.ts create mode 100644 src/hooks/useCaptchaEffect.ts create mode 100644 src/hooks/useCopy.ts create mode 100644 src/hooks/useLockFn.ts create mode 100644 src/hooks/usePolling.ts create mode 100644 src/hooks/useRecorder.ts create mode 100644 src/hooks/useShareMessage.ts create mode 100644 src/hooks/useTouch.ts create mode 100644 src/lib/fft.js create mode 100644 src/lib/html2canvas.esm.js create mode 100644 src/main.ts create mode 100644 src/manifest.json create mode 100644 src/mixins/index.ts create mode 100644 src/mixins/setTitle.ts create mode 100644 src/mixins/share.ts create mode 100644 src/mixins/theme.ts create mode 100644 src/packages/components/creation-history-item/creation-history-item.vue create mode 100644 src/packages/components/form-designer/form-designer.vue create mode 100644 src/packages/components/form-designer/widgets/checkbox.vue create mode 100644 src/packages/components/form-designer/widgets/input.vue create mode 100644 src/packages/components/form-designer/widgets/radio.vue create mode 100644 src/packages/components/form-designer/widgets/select.vue create mode 100644 src/packages/components/form-designer/widgets/textarea.vue create mode 100644 src/packages/components/model-picker/model-picker.vue create mode 100644 src/packages/components/tab/tab.vue create mode 100644 src/packages/components/tabs/tabs.vue create mode 100644 src/packages/components/uploader/uploader.vue create mode 100644 src/packages/pages/404/404.vue create mode 100644 src/packages/pages/agreement/agreement.vue create mode 100644 src/packages/pages/article_detail/article_detail.vue create mode 100644 src/packages/pages/article_list/article_list.vue create mode 100644 src/packages/pages/article_list/component/news-card.vue create mode 100644 src/packages/pages/article_list/component/news-list.vue create mode 100644 src/packages/pages/as_us/as_us.vue create mode 100644 src/packages/pages/cancelaccount/cancelaccount.vue create mode 100644 src/packages/pages/change_password/change_password.vue create mode 100644 src/packages/pages/chat/chat.vue create mode 100644 src/packages/pages/collection/collection.vue create mode 100644 src/packages/pages/create/create.vue create mode 100644 src/packages/pages/create_history/create_history.vue create mode 100644 src/packages/pages/customer_service/customer_service.vue create mode 100644 src/packages/pages/distribution_order/distribution_order.vue create mode 100644 src/packages/pages/drawing/component/component/app-split-com.vue create mode 100644 src/packages/pages/drawing/component/component/share-square.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/components/keyword-suggestion.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/dalle3-picture-size.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/dalle3-size-type.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/dalle3-style-picker.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/disclaimer-modal.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/generation-picker.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/index.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/model-picker.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/negative-prompt.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/other-prompt.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/picture-size.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/prompt-txt2img.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/reference-image.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/sd-model-picker.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/sd-picture-size.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/yj-model-picker.vue create mode 100644 src/packages/pages/drawing/component/drawing-control/yj-picture-size.vue create mode 100644 src/packages/pages/drawing/component/drawing-record/components/fail.vue create mode 100644 src/packages/pages/drawing/component/drawing-record/components/in-progress.vue create mode 100644 src/packages/pages/drawing/component/drawing-record/components/index.vue create mode 100644 src/packages/pages/drawing/component/drawing-record/components/picture.vue create mode 100644 src/packages/pages/drawing/component/drawing-record/components/success.vue create mode 100644 src/packages/pages/drawing/component/drawing-record/index.vue create mode 100644 src/packages/pages/drawing/component/drawing-record/paging.vue create mode 100644 src/packages/pages/drawing/drawing.vue create mode 100644 src/packages/pages/drawing/hooks/useConfigEffect.ts create mode 100644 src/packages/pages/drawing/hooks/useIndexEffect.ts create mode 100644 src/packages/pages/drawing/hooks/useSplit.ts create mode 100644 src/packages/pages/earnings_detail/earnings_detail.vue create mode 100644 src/packages/pages/enlarge_user/enlarge_user.vue create mode 100644 src/packages/pages/feedback/feedback.vue create mode 100644 src/packages/pages/follow_official/follow_official.vue create mode 100644 src/packages/pages/forget_pwd/forget_pwd.vue create mode 100644 src/packages/pages/invite_poster/component/invite-poster.vue create mode 100644 src/packages/pages/invite_poster/invite_poster.vue create mode 100644 src/packages/pages/mind_map/components/control-popup.vue create mode 100644 src/packages/pages/mind_map/components/mind-map-history.vue create mode 100644 src/packages/pages/mind_map/mind_map.vue create mode 100644 src/packages/pages/mind_map/webview.vue create mode 100644 src/packages/pages/open_vip/open_vip.vue create mode 100644 src/packages/pages/promotion_center/components/apply.vue create mode 100644 src/packages/pages/promotion_center/components/content.vue create mode 100644 src/packages/pages/promotion_center/promotion_center.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/custom-code-type.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/custom-keyword.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/custom-model-picker.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/custom-picture-size.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/custom-version-picker.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/images/1.png create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/images/2.png create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/images/3.png create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/images/4.png create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/images/5.png create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/images/6.png create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/images/7.png create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/mewx-template.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/pixel-style-type.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/qrcode-display.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/reference-image.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/components/zhishuyun-template.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/generation-mode.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/generation-picker.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/generation-type.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-control/index.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-record/components/fail.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-record/components/in-progress.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-record/components/index.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-record/components/picture.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-record/components/success.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-record/index.vue create mode 100644 src/packages/pages/qrcode/component/qrcode-record/paging.vue create mode 100644 src/packages/pages/qrcode/enums/qrcodeEnums.ts create mode 100644 src/packages/pages/qrcode/hooks/type.d.ts create mode 100644 src/packages/pages/qrcode/hooks/useConfigEffect.ts create mode 100644 src/packages/pages/qrcode/hooks/useIndexEffect.ts create mode 100644 src/packages/pages/qrcode/qrcode.vue create mode 100644 src/packages/pages/recharge/recharge.vue create mode 100644 src/packages/pages/recharge_record/recharge_record.vue create mode 100644 src/packages/pages/redeem_code/redeem_code.vue create mode 100644 src/packages/pages/register/register.vue create mode 100644 src/packages/pages/square/component/lists.vue create mode 100644 src/packages/pages/square/component/poster.vue create mode 100644 src/packages/pages/square/component/preview.vue create mode 100644 src/packages/pages/square/square.vue create mode 100644 src/packages/pages/task_center/task_center.vue create mode 100644 src/packages/pages/team_fans/team_fans.vue create mode 100644 src/packages/pages/user_data/user_data.vue create mode 100644 src/packages/pages/user_set/user_set.vue create mode 100644 src/packages/pages/user_wallet/user_wallet.vue create mode 100644 src/packages/pages/withdraw/component/acount-full.vue create mode 100644 src/packages/pages/withdraw/withdraw.vue create mode 100644 src/packages/pages/withdraw_record/withdraw_record.vue create mode 100644 src/packages/static/empty/create_record.png create mode 100644 src/packages/static/empty/distribute_center.png create mode 100644 src/packages/static/empty/distribute_order.png create mode 100644 src/packages/static/empty/error.png create mode 100644 src/packages/static/empty/no_login.png create mode 100644 src/packages/static/empty/team_fans.png create mode 100644 src/packages/static/empty/withdraw.png create mode 100644 src/packages/static/images/cancel.png create mode 100644 src/packages/static/images/commission_details.png create mode 100644 src/packages/static/images/coupon_bg.png create mode 100644 src/packages/static/images/delete.png create mode 100644 src/packages/static/images/distribution_orders.png create mode 100644 src/packages/static/images/draw_upload.png create mode 100644 src/packages/static/images/drawing/1.png create mode 100644 src/packages/static/images/drawing/2.png create mode 100644 src/packages/static/images/drawing/3.png create mode 100644 src/packages/static/images/drawing/4.png create mode 100644 src/packages/static/images/drawing/5.png create mode 100644 src/packages/static/images/drawing/6.png create mode 100644 src/packages/static/images/drawing/background.png create mode 100644 src/packages/static/images/drawing/dict.png create mode 100644 src/packages/static/images/drawing/empty.png create mode 100644 src/packages/static/images/drawing/error.png create mode 100644 src/packages/static/images/drawing/random.png create mode 100644 src/packages/static/images/drawing/translate.png create mode 100644 src/packages/static/images/export_download.png create mode 100644 src/packages/static/images/invite_friends.png create mode 100644 src/packages/static/images/isSelectPay.png create mode 100644 src/packages/static/images/money_bg.png create mode 100644 src/packages/static/images/poster.png create mode 100644 src/packages/static/images/praise.png create mode 100644 src/packages/static/images/praise02.png create mode 100644 src/packages/static/images/recharge_success.png create mode 100644 src/packages/static/images/square/error.png create mode 100644 src/packages/static/images/square/icon_copy.png create mode 100644 src/packages/static/images/square/icon_save.png create mode 100644 src/packages/static/images/square/loading.png create mode 100644 src/packages/static/images/team_fans.png create mode 100644 src/packages/static/images/vip_bg.png create mode 100644 src/pages.json create mode 100644 src/pages/ai_creation/ai_creation.vue create mode 100644 src/pages/app/app.vue create mode 100644 src/pages/empty/empty.vue create mode 100644 src/pages/index/components/follow-official.vue create mode 100644 src/pages/index/components/ios-privacy-popup.vue create mode 100644 src/pages/index/components/mp-privacy-popup.vue create mode 100644 src/pages/index/components/problem-example-popup.vue create mode 100644 src/pages/index/components/problem-example.vue create mode 100644 src/pages/index/components/session-item.vue create mode 100644 src/pages/index/components/session-popup.vue create mode 100644 src/pages/index/components/session.vue create mode 100644 src/pages/index/components/useSessionList.ts create mode 100644 src/pages/index/index.vue create mode 100644 src/pages/login/components/bind-mobile.vue create mode 100644 src/pages/login/components/mailbox.vue create mode 100644 src/pages/login/components/mobile.vue create mode 100644 src/pages/login/components/update-user-info.vue create mode 100644 src/pages/login/components/weixin.vue create mode 100644 src/pages/login/login.vue create mode 100644 src/pages/pc_login/pc_login.vue create mode 100644 src/pages/skills/skills.vue create mode 100644 src/pages/user/user.vue create mode 100644 src/pages/webview/webview.vue create mode 100644 src/plugins/index.ts create mode 100644 src/plugins/modules/pinia.ts create mode 100644 src/plugins/modules/uview.ts create mode 100644 src/plugins/modules/vconsole.ts create mode 100644 src/router/index.ts create mode 100644 src/static/images/chat_plugins/plugins.png create mode 100644 src/static/images/chat_plugins/unuse.png create mode 100644 src/static/images/common/bubble_bg.png create mode 100644 src/static/images/common/icon_copy.png create mode 100644 src/static/images/common/icon_cutout.png create mode 100644 src/static/images/common/icon_delete.png create mode 100644 src/static/images/common/icon_download.png create mode 100644 src/static/images/common/icon_reload.png create mode 100644 src/static/images/common/icon_share.png create mode 100644 src/static/images/common/robot_avatar.png create mode 100644 src/static/images/common/translate.png create mode 100644 src/static/images/common/user_avatar.png create mode 100644 src/static/images/floating_menu/back.png create mode 100644 src/static/images/floating_menu/home.png create mode 100644 src/static/images/floating_menu/unfold.png create mode 100644 src/static/images/floating_menu/user.png create mode 100644 src/static/images/icon/icon_code.png create mode 100644 src/static/images/icon/icon_copy.png create mode 100644 src/static/images/icon/icon_doc.png create mode 100644 src/static/images/icon/icon_email.png create mode 100644 src/static/images/icon/icon_home.png create mode 100644 src/static/images/icon/icon_member.png create mode 100644 src/static/images/icon/icon_mobile.png create mode 100644 src/static/images/icon/icon_password.png create mode 100644 src/static/images/icon/icon_phone.png create mode 100644 src/static/images/icon/icon_unselect.png create mode 100644 src/static/images/icon/icon_upload.png create mode 100644 src/static/images/icon/icon_user.png create mode 100644 src/static/images/icon/icon_visit.png create mode 100644 src/static/images/icon/icon_wx.png create mode 100644 src/static/images/payment/icon_succeed.png create mode 100644 src/static/images/payment/icon_waiting.png create mode 100644 src/static/images/user/default_avatar.png create mode 100644 src/static/images/user/my_topbg.png create mode 100644 src/static/images/user/user_bg.png create mode 100644 src/static/images/user/user_vip.png create mode 100644 src/stores/androidPermissions.ts create mode 100644 src/stores/app.ts create mode 100644 src/stores/navigationBarTitle.ts create mode 100644 src/stores/theme.ts create mode 100644 src/stores/user.ts create mode 100644 src/styles/index.scss create mode 100644 src/styles/public.scss create mode 100644 src/styles/tailwind.css create mode 100644 src/styles/var.css create mode 100644 src/typings/env.d.ts create mode 100644 src/typings/router.d.ts create mode 100644 src/typings/uni.d.ts create mode 100644 src/typings/vue.d.ts create mode 100644 src/uni.scss create mode 100644 src/uni_modules/lime-painter/changelog.md create mode 100644 src/uni_modules/lime-painter/components/common/relation.js create mode 100644 src/uni_modules/lime-painter/components/l-painter-image/l-painter-image.vue create mode 100644 src/uni_modules/lime-painter/components/l-painter-qrcode/l-painter-qrcode.vue create mode 100644 src/uni_modules/lime-painter/components/l-painter-text/l-painter-text.vue create mode 100644 src/uni_modules/lime-painter/components/l-painter-view/l-painter-view.vue create mode 100644 src/uni_modules/lime-painter/components/l-painter/l-painter.vue create mode 100644 src/uni_modules/lime-painter/components/l-painter/nvue.js create mode 100644 src/uni_modules/lime-painter/components/l-painter/painter.js create mode 100644 src/uni_modules/lime-painter/components/l-painter/props.js create mode 100644 src/uni_modules/lime-painter/components/l-painter/utils.js create mode 100644 src/uni_modules/lime-painter/components/lime-painter/index.vue create mode 100644 src/uni_modules/lime-painter/components/lime-painter/lime-painter.vue create mode 100644 src/uni_modules/lime-painter/package.json create mode 100644 src/uni_modules/lime-painter/readme.md create mode 100644 src/uni_modules/lime-painter/static/index.html create mode 100644 src/uni_modules/lime-painter/static/painter.js create mode 100644 src/uni_modules/lime-painter/static/uni.webview.1.5.3.js create mode 100644 src/uni_modules/mp-html/README.md create mode 100644 src/uni_modules/mp-html/changelog.md create mode 100644 src/uni_modules/mp-html/components/mp-html/mp-html.vue create mode 100644 src/uni_modules/mp-html/components/mp-html/node/node.vue create mode 100644 src/uni_modules/mp-html/components/mp-html/parser.js create mode 100644 src/uni_modules/mp-html/package.json create mode 100644 src/uni_modules/mp-html/static/app-plus/mp-html/js/handler.js create mode 100644 src/uni_modules/mp-html/static/app-plus/mp-html/js/uni.webview.min.js create mode 100644 src/uni_modules/mp-html/static/app-plus/mp-html/local.html create mode 100644 src/uni_modules/vk-uview-ui/changelog.md create mode 100644 src/uni_modules/vk-uview-ui/components/u-action-sheet/u-action-sheet.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-alert-tips/u-alert-tips.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-avatar-cropper/u-avatar-cropper.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-avatar-cropper/weCropper.js create mode 100644 src/uni_modules/vk-uview-ui/components/u-avatar/u-avatar.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-back-top/u-back-top.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-badge/u-badge.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-button/u-button.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-calendar/u-calendar.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-car-keyboard/u-car-keyboard.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-card/u-card.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-cell-group/u-cell-group.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-cell-item/u-cell-item.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-checkbox-group/u-checkbox-group.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-checkbox/u-checkbox.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-circle-progress/u-circle-progress.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-col/u-col.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-collapse-item/u-collapse-item.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-collapse/u-collapse.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-column-notice/u-column-notice.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-count-down/u-count-down.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-count-down/utils.js create mode 100644 src/uni_modules/vk-uview-ui/components/u-count-to/u-count-to.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-divider/u-divider.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-dropdown-item/u-dropdown-item.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-dropdown/u-dropdown.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-empty/u-empty.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-field/u-field.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-form-item/u-form-item.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-form/u-form.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-full-screen/u-full-screen.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-gap/u-gap.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-grid-item/u-grid-item.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-grid/u-grid.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-icon/u-icon.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-image/u-image.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-index-anchor/u-index-anchor.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-index-list/u-index-list.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-input/u-input.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-keyboard/u-keyboard.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-lazy-load/u-lazy-load.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-line-progress/u-line-progress.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-line/u-line.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-link/u-link.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-loading-page/u-loading-page.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-loading/u-loading.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-loadmore/u-loadmore.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-mask/u-mask.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-message-input/u-message-input.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-modal/u-modal.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-navbar/u-navbar.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-no-network/u-no-network.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-notice-bar/u-notice-bar.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-number-box/u-number-box.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-number-keyboard/u-number-keyboard.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-picker/u-picker.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-popup/u-popup.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-radio-group/u-radio-group.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-radio/u-radio.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-rate/u-rate.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-read-more/u-read-more.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-row-notice/u-row-notice.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-row/u-row.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-search/u-search.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-section/u-section.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-select/u-select.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-skeleton/u-skeleton.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-slider/u-slider.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-steps/u-steps.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-sticky/u-sticky.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-subsection/u-subsection.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-swipe-action/u-swipe-action.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-swiper/u-swiper.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-switch/u-switch.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-tabbar/u-tabbar.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-table/u-table.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-tabs/u-tabs.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-tag/u-tag.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-td/u-td.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-th/u-th.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-time-line-item/u-time-line-item.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-time-line/u-time-line.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-toast/u-toast.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-top-tips/u-top-tips.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-tr/u-tr.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-upload/u-upload.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-verification-code/u-verification-code.vue create mode 100644 src/uni_modules/vk-uview-ui/components/u-waterfall/u-waterfall.vue create mode 100644 src/uni_modules/vk-uview-ui/components/vk-uview-ui/vk-uview-ui.vue create mode 100644 src/uni_modules/vk-uview-ui/iconfont.css create mode 100644 src/uni_modules/vk-uview-ui/index.js create mode 100644 src/uni_modules/vk-uview-ui/index.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/address/areas.json create mode 100644 src/uni_modules/vk-uview-ui/libs/address/citys.json create mode 100644 src/uni_modules/vk-uview-ui/libs/address/provinces.json create mode 100644 src/uni_modules/vk-uview-ui/libs/config/config.js create mode 100644 src/uni_modules/vk-uview-ui/libs/config/zIndex.js create mode 100644 src/uni_modules/vk-uview-ui/libs/css/color.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/css/common.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/css/style.components.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/css/style.h5.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/css/style.mp.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/css/style.nvue.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/css/style.vue.scss create mode 100644 src/uni_modules/vk-uview-ui/libs/function/$parent.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/addUnit.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/bem.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/color.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/colorGradient.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/debounce.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/deepClone.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/deepMerge.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/getParent.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/guid.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/md5.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/queryParams.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/random.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/randomArray.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/route.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/sys.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/test.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/throttle.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/timeFormat.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/timeFrom.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/toast.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/trim.js create mode 100644 src/uni_modules/vk-uview-ui/libs/function/type2icon.js create mode 100644 src/uni_modules/vk-uview-ui/libs/mixin/mixin.js create mode 100644 src/uni_modules/vk-uview-ui/libs/mixin/mpShare.js create mode 100644 src/uni_modules/vk-uview-ui/libs/request/index.js create mode 100644 src/uni_modules/vk-uview-ui/libs/store/index.js create mode 100644 src/uni_modules/vk-uview-ui/libs/util/async-validator.js create mode 100644 src/uni_modules/vk-uview-ui/libs/util/emitter.js create mode 100644 src/uni_modules/vk-uview-ui/package.json create mode 100644 src/uni_modules/vk-uview-ui/readme.md create mode 100644 src/uni_modules/vk-uview-ui/theme.scss create mode 100644 src/utils/auth.ts create mode 100644 src/utils/cache.ts create mode 100644 src/utils/client.ts create mode 100644 src/utils/date.ts create mode 100644 src/utils/device/vibrate.ts create mode 100644 src/utils/env.ts create mode 100644 src/utils/file.ts create mode 100644 src/utils/html2canvas.ts create mode 100644 src/utils/imgPath.js create mode 100644 src/utils/pay/alipay.ts create mode 100644 src/utils/pay/balance.ts create mode 100644 src/utils/pay/index.ts create mode 100644 src/utils/pay/pay.ts create mode 100644 src/utils/pay/wechat.ts create mode 100644 src/utils/request/cancel.ts create mode 100644 src/utils/request/http.ts create mode 100644 src/utils/request/index.ts create mode 100644 src/utils/request/type.d.ts create mode 100644 src/utils/theme.ts create mode 100644 src/utils/util.ts create mode 100644 src/utils/validate.ts create mode 100644 src/utils/wechat.ts create mode 100644 tailwind.config.js create mode 100644 tsconfig.json create mode 100644 typings/env.d.ts create mode 100644 typings/router.d.ts create mode 100644 typings/uni.d.ts create mode 100644 typings/vue.d.ts create mode 100644 unpackage/res/icons/1024x1024.png create mode 100644 unpackage/res/icons/120x120.png create mode 100644 unpackage/res/icons/144x144.png create mode 100644 unpackage/res/icons/152x152.png create mode 100644 unpackage/res/icons/167x167.png create mode 100644 unpackage/res/icons/180x180.png create mode 100644 unpackage/res/icons/192x192.png create mode 100644 unpackage/res/icons/20x20.png create mode 100644 unpackage/res/icons/29x29.png create mode 100644 unpackage/res/icons/40x40.png create mode 100644 unpackage/res/icons/58x58.png create mode 100644 unpackage/res/icons/60x60.png create mode 100644 unpackage/res/icons/72x72.png create mode 100644 unpackage/res/icons/76x76.png create mode 100644 unpackage/res/icons/80x80.png create mode 100644 unpackage/res/icons/87x87.png create mode 100644 unpackage/res/icons/96x96.png create mode 100644 vite.config.ts create mode 100644 yarn.lock diff --git a/.env.development.example b/.env.development.example new file mode 100644 index 0000000..c26c7fb --- /dev/null +++ b/.env.development.example @@ -0,0 +1,3 @@ + +# 请求域名 +VITE_APP_BASE_URL='' \ No newline at end of file diff --git a/.env.production.example b/.env.production.example new file mode 100644 index 0000000..c26c7fb --- /dev/null +++ b/.env.production.example @@ -0,0 +1,3 @@ + +# 请求域名 +VITE_APP_BASE_URL='' \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..86f5ee0 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,39 @@ +/* eslint-env node */ +require('@rushstack/eslint-patch/modern-module-resolution') + +module.exports = { + root: true, + ignorePatterns: ['src/uni_modules/'], + extends: [ + 'plugin:vue/vue3-essential', + 'eslint:recommended', + '@vue/eslint-config-typescript/recommended', + '@vue/eslint-config-prettier' + ], + rules: { + 'prettier/prettier': [ + 'warn', + { + semi: false, + singleQuote: true, + printWidth: 100, + proseWrap: 'preserve', + bracketSameLine: false, + endOfLine: 'lf', + tabWidth: 4, + useTabs: false, + trailingComma: 'none' + } + ], + 'vue/multi-word-component-names': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + 'no-undef': 'off', + 'vue/prefer-import-from-vue': 'off', + 'no-prototype-builtins': 'off', + 'prefer-spread': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-non-null-asserted-optional-chain': 'off' + }, + globals: {} +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d73bcf6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.hbuilderx +# .env +.env.development +.env.production diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..91f12b2 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2a24d8a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "editor.detectIndentation": false, + "editor.tabSize": 4, + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" +}, + "css.validate": false, + "less.validate": false, + "scss.validate": false +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..043bc01 --- /dev/null +++ b/index.html @@ -0,0 +1,21 @@ + + + + + + + + + + + +
+ + + diff --git a/initialize.js b/initialize.js new file mode 100644 index 0000000..20fd930 --- /dev/null +++ b/initialize.js @@ -0,0 +1 @@ +const fs = require('fs') const { spawn } = require('child_process') class InitializeItem { static instance = null constructor() { if (InitializeItem.instance) { return InitializeItem.instance } InitializeItem.instance = this } async promptUser(question) { return new Promise((resolve, reject) => { const readline = require('readline') const rl = readline.createInterface({ input: process.stdin, output: process.stdout }) rl.question(question, (res) => { resolve(res) rl.close() }) }) } async shouldInstallDependencies() { const isInstall = await this.promptUser( '是否需要自动帮您安装依赖(y/n):' ) if (isInstall.toLowerCase() === 'y') { return true } else if (isInstall.toLowerCase() === 'n') { return false } else { return this.shouldInstallDependencies() } } async installDependencies() { return new Promise((resolve, reject) => { console.log('开始安装相关依赖...') const command = process.platform === 'win32' ? 'cmd.exe' : 'npm' const args = process.platform === 'win32' ? ['/c', 'npm', 'install'] : ['install'] const installProcess = spawn(command, args) installProcess.stdout.on('data', (data) => { console.log(data.toString()) }) installProcess.stderr.on('data', (data) => { console.error(data.toString()) }) installProcess.on('close', (code) => { if (code !== 0) { reject( new Error( `运行安装依赖命令错误,请查看以下报错信息寻找解决方法: ${error.message}` ) ) } else { console.log('安装依赖成功!') resolve() } }) }) } async copyFile(sourceDir, targetDir) { return new Promise((resolve, reject) => { fs.copyFile(sourceDir, targetDir, (error) => { if (error) { reject(error) throw new Error(`复制文件失败: ${error.message}`) } resolve() }) }) } async writeToFile(filePath, { sourceData, targetData }) { return new Promise((resolve, reject) => { fs.readFile(filePath, 'utf8', (err, data) => { if (err) { console.error('读取文件失败:', err) return } const modifiedData = data.replace(sourceData, targetData) fs.writeFile(filePath, modifiedData, 'utf8', (err) => { if (err) { console.error('写入文件错误:', err) return } resolve() }) }) }) } async initialize(targetVersion) { const currentVersion = process.versions.node if (currentVersion < targetVersion) { throw new Error( `你的当前node版本为(${currentVersion}),需要安装目标版本为 ${targetVersion} 以上!!` ) } const shouldInstall = await this.shouldInstallDependencies() if (shouldInstall) { await this.installDependencies() } await this.copyFile('.env.development.example', '.env.development') await this.copyFile('.env.production.example', '.env.production') const domain = await this.promptUser('请输入您的服务器域名地址:') await this.writeToFile('.env.development', { sourceData: `VITE_APP_BASE_URL=''`, targetData: `VITE_APP_BASE_URL='${domain}'` }) await this.writeToFile('.env.production', { sourceData: `VITE_APP_BASE_URL=''`, targetData: `VITE_APP_BASE_URL='${domain}'` }) require('./scripts/develop'); } static getInstance() { if (!InitializeItem.instance) { InitializeItem.instance = new InitializeItem() } return InitializeItem.instance } } ;(async () => { const initializeItem = InitializeItem.getInstance() try { await initializeItem.initialize('16.16.0') } catch (error) { console.error(error.message) } })() \ No newline at end of file diff --git a/my-release-key.keystore b/my-release-key.keystore new file mode 100644 index 0000000000000000000000000000000000000000..444824370ae7e5fb25a347b5490a2f6c853ac850 GIT binary patch literal 2851 zcma)6c{J3G8vYG4!&t*0`;3Gp%Wv!|YYi$jh>)f1`%Wd%7)uhe^_e6~_7Ek;mL+3} zEUCsGvSuuw$j)5n+T!f+H}|2GLvW5GF`A zk>w+l$kKL1w}3=g&3{R-Vki-oe?;dT^$R%be_U)V5Qc0b3_K!bK<7UW7&~YQs{OOF zfv2HJ@B2X^6=_g~Y1V;SbhE?NwIqQQ1_r5P3=kB^250{FM+O8807c-4ThRs(Cq^g) z13gxZ;t^y>FxQrI2=5;XgO5Xr(B=*1o6+WG(JN`d-dpYZYo(|q94c+EwK#FI1no-sFp+Iaps=P{{AQZztlMZ6Af2 zf+_5(sSVGtYt2NlvSStVrLy~G_6XrF%$0@f?D-0VJdV*4x#Th$54vd}{J2@UF~^z7 zxnFgUsiQ$JZ&z##MvBX2&3Wp)b@Gb(D#bf~flq@+C0o^&rT)DC{9}9n(yX9C{zXVV zjT_0bplx63H@Pt(n-Ou6zSFKnOO-0mJH&@72AMvfixZT^ppujMNqUKe&F{`*eo%U^ z{*Z--$Kr&Yttlds8-fp%D_mCtwh)q*lo92sT7&oP0b|}4lAo{hf0!H>%VhiUv?k;F zb&cZd;$Wdd!CKV<2{w_;JC(B*i9@ZPT?!f*{rp%CmnzENx43NK$|z4O9uZT@ZrpxIv?$k#2uX1qGID^n`@Yr)z_VqE#`f>|~E9HXWD zuoG78$00hAFG~oDSHt2RZYRzLtI!c)?RVmBw*m}yN7Llbt7tgn5v9z&ADA<*fYkazR>3S*XBUK z+b0kDbZ`7(tbUJ7 zk?WI1%CZbCdGUTwS=Pf(#;k|*kZ+rRr-K+rZ=KRz*Qc8VH^_Lu8mpNt>gXDq87e?rijmREtwNe9frq9w|1OD;}va zso#@rr#+tp$3U&w8UbSLsfOH7kosQI^o%3(8Li|G zhk9p>UY(X%r*DwCy&V@RO*rQWE8qNx!CKPJ{>(;Jtny^?4V=&tU9it|3;*~Hda!q7 zVxmPWYZclt-=|}&M>!`%-ds@6IyPSP zoV6<^x$^M*%-gb*zas!Hs^-Eq-{85G^)KQR$+&*5XIi6xwsd8PnSE6E%5H-+GfWW&!twm5m2eB zVp_>~yAcQPo<_W|dVgYyZlbIC`yJ7p|t zjYp$Pc;ZdF&X+R>+PEg1QjZYjGB2>-WB#mmK9F~%8yEVi;D<9`h#~d{sQf1$5lF1G zs3hP3_yAsj9N+@n1A>9ON5~6sJSscD4Uj!jU5`*8i2ldMi$y}YP2IelP*@dpRZtC7 zQBzk{S3JsM$e$x7cs3FG3nW5U7$CsWnEywC{I9?kt1!XdO6ckwYkx#`6EG4POwpkK zKY^`LHmvhr5qWSbiQ`EL8y!v{LVc@{;pzEV`xdBpg@mP33I0<2+%lY&lC#23hdP-` z;C}8+b~Z0jl&a>qPVI!Pnw8L1VJ6*HhbdM+$GaK{=DC3E6JjMRbOlvWg6xbV++rE;drZ(n=;W!8=CHMF^XqOvyW~A5{geTr) za`L-%plw+a=_m+gsCl25`Ev4A;?S`yt!|W)XMk0F#{+z>=nQ7ge<=Re!j^4YP0SU9 zSnO}CnVk5^+8K)Q$LtFddB^~L+mr-L(r3)`T0HD$=o|akGdC=aa8NqsLXLb-5zRuc z_AJ>}am{4q?=iwB-<~+L-2&H8{%!wY)=yfKX^K}XrRk3^{%yB#5c?!V1kWF<&s~+X z0@#+M2Zv7%X3|Y&mJ~|p+b@2#$9`?K5ccm6%$P8ch}ua^M_(00_11k4dGQM*P}dkw zH=(hIRO@4bk34-(BNd@PzkKs)2t)T~Zmd|%1H&(Bw8X^RZUq8Bzu8}!7}G}58D$KI zaZPyUr^34k!*#m3K51=3AdZAnT~)Y5x%|x4Z?Z$xbC8_-Ms=3w+4JCng&Nx6iQ5M1 zRt4v-rjHjD7uW~GxSY#pyT!UY0o;{R%Bp{>2W9ZSnfUs>i){(4hGpbD!`f>?{(REz zCO&T~;b*J?n{Db)1ljOOq+_lc6-z4$$&dsA^o7VnC0B`yWc)o9TB5n6eUeT%E9v1o)If8?#0jsN z-+YI~TQL{9FGL(~Wfomf;zbz&)p`OoL;cYH>*J+diRX$gwtb5L)=h;r%unt**X65f_X&Oy56~W@Gm<{ z<4*PJhkAy&muT(9-;TBAlH$IU+<^Ee%?OByPnQkM&bnn@gc`&IedbOtZh4*17jJL6 z({iryPOphIm%DBdHD0`1a-h#mE+zP3qb?j&+fDV`_lPHl9O5kw8@?hZU*91=kw$7Z z=Jo(7(j6_z3cZ_-2LSZZ@OdN$RR3q{VH c3+|qle$c4_E70{ut5k}7Lgq3sLZY+(1qrtz%K!iX literal 0 HcmV?d00001 diff --git a/package.json b/package.json new file mode 100644 index 0000000..8f01c05 --- /dev/null +++ b/package.json @@ -0,0 +1,108 @@ +{ + "name": "uni-preset-vue", + "version": "0.0.0", + "scripts": { + "init": "node initialize.js", + "dev": "node scripts/develop.js", + "dev:app": "uni -p app", + "dev:custom": "uni -p", + "dev:h5": "uni", + "dev:h5:ssr": "uni --ssr", + "dev:mp-alipay": "uni -p mp-alipay", + "dev:mp-baidu": "uni -p mp-baidu", + "dev:mp-kuaishou": "uni -p mp-kuaishou", + "dev:mp-lark": "uni -p mp-lark", + "dev:mp-qq": "uni -p mp-qq", + "dev:mp-toutiao": "uni -p mp-toutiao", + "dev:mp-weixin": "uni -p mp-weixin", + "dev:quickapp-webview": "uni -p quickapp-webview", + "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei", + "dev:quickapp-webview-union": "uni -p quickapp-webview-union", + "build": "node scripts/publish.js", + "build:app": "uni build -p app", + "build:custom": "uni build -p", + "build:h5": "uni build && node scripts/release.mjs -t h5 -o mobile", + "build:h5:ssr": "uni build --ssr", + "build:mp-alipay": "uni build -p mp-alipay", + "build:mp-baidu": "uni build -p mp-baidu", + "build:mp-kuaishou": "uni build -p mp-kuaishou", + "build:mp-lark": "uni build -p mp-lark", + "build:mp-qq": "uni build -p mp-qq", + "build:mp-toutiao": "uni build -p mp-toutiao", + "build:mp-weixin": "uni build -p mp-weixin && node scripts/release.mjs -t mp-weixin -o weapp", + "build:quickapp-webview": "uni build -p quickapp-webview", + "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei", + "build:quickapp-webview-union": "uni build -p quickapp-webview-union", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" + }, + "dependencies": { + "@dcloudio/uni-app": "3.0.0-3070920230324001", + "@dcloudio/uni-app-plus": "3.0.0-3070920230324001", + "@dcloudio/uni-components": "3.0.0-3070920230324001", + "@dcloudio/uni-h5": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-alipay": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-baidu": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-jd": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-kuaishou": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-lark": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-qq": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-toutiao": "3.0.0-3070920230324001", + "@dcloudio/uni-mp-weixin": "3.0.0-3070920230324001", + "@dcloudio/uni-quickapp-webview": "3.0.0-3070920230324001", + "@dcloudio/uni-webview-js": "0.0.3", + "@iktakahiro/markdown-it-katex": "4.0.1", + "@vueuse/core": "9.8.2", + "css-color-function": "1.3.3", + "github-markdown-css": "5.2.0", + "highlight.js": "11.0.0", + "howler": "2.2.4", + "js-mp3": "0.1.0", + "jsonc-parser": "3.2.1", + "js-base64": "^3.7.5", + "lodash-es": "4.17.21", + "markdown-it": "^13.0.1", + "markdown-it-math": "4.1.1", + "markmap-common": "0.15.3", + "markmap-lib": "0.15.4", + "markmap-view": "0.15.4", + "mathjs": "11.8.0", + "pinia": "2.0.20", + "recorder-core": "1.3.23122400", + "uniapp-router-next": "1.2.7", + "uniapp-router-next-zm": "^1.0.1", + "vconsole": "3.14.6", + "vue": "3.2.45", + "vue-i18n": "9.1.9", + "weixin-js-sdk": "1.6.0", + "z-paging": "2.7.6" + }, + "devDependencies": { + "@dcloudio/types": "^3.3.2", + "@dcloudio/uni-automator": "3.0.0-3070920230324001", + "@dcloudio/uni-cli-shared": "3.0.0-3070920230324001", + "@dcloudio/uni-stacktracey": "3.0.0-3070920230324001", + "@dcloudio/vite-plugin-uni": "3.0.0-3070920230324001", + "@rushstack/eslint-patch": "1.1.4", + "@types/howler": "2.2.11", + "@types/lodash-es": "4.17.6", + "@types/markdown-it": "12.2.3", + "@types/node": "18.7.16", + "@vue/eslint-config-prettier": "7.0.0", + "@vue/eslint-config-typescript": "11.0.0", + "autoprefixer": "10.4.8", + "eslint": "8.22.0", + "eslint-plugin-vue": "9.4.0", + "execa": "6.1.0", + "fs-extra": "10.1.0", + "minimist": "1.2.8", + "postcss": "8.4.16", + "postcss-rem-to-responsive-pixel": "5.1.3", + "prettier": "2.7.1", + "sass": "1.54.5", + "tailwindcss": "3.3.2", + "typescript": "4.7.4", + "unplugin-uni-router": "1.2.7", + "vite": "4.1.4", + "weapp-tailwindcss-webpack-plugin": "1.12.8" + } +} diff --git a/scripts/develop.js b/scripts/develop.js new file mode 100644 index 0000000..f8aa332 --- /dev/null +++ b/scripts/develop.js @@ -0,0 +1,105 @@ +const { spawn } = require('child_process') +const readline = require('readline') + +class DevelopClientScript { + constructor() { + if (DevelopClientScript.instance) { + return DevelopClientScript.instance + } + DevelopClientScript.instance = this + } + + promptUser(question) { + return new Promise((resolve) => { + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }) + rl.question(question, (res) => { + resolve(res) + rl.close() + }) + }) + } + + async runClient() { + console.error('请选择你需要运行的客户端(回复数字后回车)') + console.error('0.取消') + console.error('1.微信小程序') + console.error('2.公众号或者H5') + const runClientRes = await this.promptUser('请输入运行的客户端:') + switch (runClientRes) { + case '0': + break + case '1': + await this.runNpmScript('dev:mp-weixin') + break + case '2': + await this.runNpmScript('dev:h5') + break + default: + await this.runClient() + break + } + } + + runNpmScript(scriptName) { + return new Promise((resolve, reject) => { + const isWindows = process.platform === 'win32' + const command = isWindows ? 'cmd.exe' : 'npm' + const args = isWindows + ? ['/c', 'npm', 'run', scriptName] + : ['run', scriptName] + + const runProcess = spawn(command, args) + + runProcess.stdout.on('data', (data) => { + console.log(data.toString()) + }) + + runProcess.stderr.on('data', (data) => { + console.error(data.toString()) + }) + + runProcess.on('close', (code) => { + if (code !== 0) { + reject( + new Error( + `运行错误,请查看以下报错信息寻找解决方法: ${error.message}` + ) + ) + } else { + resolve() + } + }) + }) + } + + async run(targetVersion) { + const currentVersion = process.versions.node + + if (currentVersion < targetVersion) { + throw new Error( + `你的当前node版本为(${currentVersion}),需要安装目标版本为 ${targetVersion} 以上!!` + ) + } + + await this.runClient() + } + + static getInstance() { + if (!DevelopClientScript.instance) { + DevelopClientScript.instance = new DevelopClientScript() + } + return DevelopClientScript.instance + } +} + +;(async () => { + const develop = DevelopClientScript.getInstance() + try { + await develop.run('16.16.0') + } catch (error) { + console.error(error.message) + } +})() diff --git a/scripts/publish.js b/scripts/publish.js new file mode 100644 index 0000000..1658328 --- /dev/null +++ b/scripts/publish.js @@ -0,0 +1 @@ +const { spawn } = require('child_process') const readline = require('readline') class PublishClientScript { constructor() { if (PublishClientScript.instance) { return PublishClientScript.instance } PublishClientScript.instance = this } promptUser(question) { return new Promise((resolve) => { const rl = readline.createInterface({ input: process.stdin, output: process.stdout }) rl.question(question, (res) => { resolve(res) rl.close() }) }) } async runClient() { console.error('请选择你需要打包的客户端(回复数字后回车) ') console.error('0.取消') console.error('1.微信小程序') console.error('2.公众号或者H5') const runClientRes = await this.promptUser('请输入打包的客户端:') switch (runClientRes) { case '0': break case '1': await this.runNpmScript('build:mp-weixin') break case '2': await this.runNpmScript('build:h5') break default: await this.runClient() break } } runNpmScript(scriptName) { return new Promise((resolve, reject) => { const isWindows = process.platform === 'win32' const command = isWindows ? 'cmd.exe' : 'npm' const args = isWindows ? ['/c', 'npm', 'run', scriptName] : ['run', scriptName] const runProcess = spawn(command, args) runProcess.stdout.on('data', (data) => { console.log(data.toString()) }) runProcess.stderr.on('data', (data) => { console.error(data.toString()) }) runProcess.on('close', (code) => { if (code !== 0) { reject( new Error( `运行错误,请查看以下报错信息寻找解决方法: ${error.message}` ) ) } else { resolve() } }) }) } async run(targetVersion) { const currentVersion = process.versions.node if (currentVersion < targetVersion) { throw new Error( `你的当前node版本为(${currentVersion}),需要安装目标版本为 ${targetVersion} 以上!!` ) } await this.runClient() } static getInstance() { if (!PublishClientScript.instance) { PublishClientScript.instance = new PublishClientScript() } return PublishClientScript.instance } } ;(async () => { const publish = PublishClientScript.getInstance() try { await publish.run('16.16.0') } catch (error) { console.error(error.message) } })() \ No newline at end of file diff --git a/scripts/release.mjs b/scripts/release.mjs new file mode 100644 index 0000000..cab0f19 --- /dev/null +++ b/scripts/release.mjs @@ -0,0 +1,46 @@ +import path from 'path' +import fsExtra from 'fs-extra' +import minimist from 'minimist' +const { existsSync, remove, copy } = fsExtra +const cwd = process.cwd() +const argv = minimist(process.argv.slice(2), { + alias: { + target: 't', + output: 'o' + } +}) +//打包发布路径,谨慎改动 +const releaseRelativePath = `../public/${argv.output}` +const distPath = path.resolve(cwd, `dist/build/${argv.target}`) +const releasePath = path.resolve(cwd, releaseRelativePath) + +async function build() { + if (existsSync(releasePath)) { + await remove(releasePath) + } + console.log( + `文件正在复制:dist/build/${argv.target} ==> ${releaseRelativePath}` + ) + try { + await copyFile(distPath, releasePath) + } catch (error) { + console.log(`\n ${error}`) + } + console.log( + `文件已复制:dist/build/${argv.target} ==> ${releaseRelativePath}` + ) +} + +function copyFile(sourceDir, targetDir) { + return new Promise((resolve, reject) => { + copy(sourceDir, targetDir, (err) => { + if (err) { + reject(err) + } else { + resolve() + } + }) + }) +} + +build() diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..01e75b0 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,76 @@ + + diff --git a/src/androidPrivacy.json b/src/androidPrivacy.json new file mode 100644 index 0000000..5fc48cb --- /dev/null +++ b/src/androidPrivacy.json @@ -0,0 +1,40 @@ +{ + "version" : "1", + "prompt" : "template", + "title" : "用户协议及隐私政策", + "message" : "  为了更好保证您的合法权益,请仔细阅读并同意以下协议。
《用户协议》《隐私政策》", + "buttonAccept" : "同意并接受", + "buttonRefuse" : "暂不同意", + "hrefLoader" : "system|default", + "backToExit" : "false", + "second" : { + "title" : "确认提示", + "message" : "  进入应用前,你需先同意《用户协议》《隐私政策》,否则将退出应用。", + "buttonAccept" : "同意并继续", + "buttonRefuse" : "退出应用" + }, + "disagreeMode" : { + "support" : false, + "loadNativePlugins" : false, + "visitorEntry" : true, + "showAlways" : false + }, + "styles" : { + "backgroundColor" : "#ffffff", + "borderRadius" : "5px", + "title" : { + "color" : "#000000", + "fontWeight" : "bolder" + }, + "buttonAccept" : { + "color" : "#000000" + }, + "buttonRefuse" : { + "color" : "#000000", + "backgroundColor" : "#FFB529" + }, + "buttonVisitor" : { + "color" : "#000000" + } + } +} diff --git a/src/api/account.ts b/src/api/account.ts new file mode 100644 index 0000000..ba2aa37 --- /dev/null +++ b/src/api/account.ts @@ -0,0 +1,74 @@ +import request from '@/utils/request' +import { getClient } from '@/utils/client' + +// 登录 +export function mobileLogin(data: Record) { + return request.post({ url: '/login/mobileLogin', data }) +} + +// 账号登录 +export function accountLogin(data: Record) { + return request.post({ url: '/login/accountLogin', data }) +} + +// 邮箱登录 +export function emailLogin(data: any) { + return request.post({ + url: '/login/emailLogin', + data: { ...data, terminal: getClient() } + }) +} + +//邮箱注册 +export function emailRegister(data: any) { + return request.post({ + url: '/login/email/register', + data + }) +} + +//发送邮箱验证码 +export function sendEmailCode(data: any) { + return request.post({ url: '/index/sendEmail', data }) +} + +//注册 +export function register(data: Record) { + return request.post({ url: '/login/register', data }) +} + +//忘记密码 +export function forgotPassword(data: Record) { + return request.post({ url: '/user/forgotPwd', data }) +} + +//邮箱忘记密码 +export function emailForgotPassword(data: Record) { + return request.post({ url: '/user/email/forgotPwd', data }) +} + +//向微信请求code的链接 +export function getWxCodeUrl(data: Record) { + return request.get({ url: '/login/oaCodeUrl', data }) +} + +// 微信小程序登录 + +export function mnpLogin(data: Record) { + return request.post({ url: '/login/mnpLogin', data }) +} + +// APP登录 +export function uninAppLogin(data: Record) { + return request.post({ url: '/login/appLogin', data }) +} + +// 公众号登录 +export function OALogin(data: Record) { + return request.post({ url: '/login/oaLogin', data }) +} + +//获取图形验证码 +export function captcha() { + return request.get({ url: '/login/captcha' }) +} \ No newline at end of file diff --git a/src/api/app.ts b/src/api/app.ts new file mode 100644 index 0000000..9fe596a --- /dev/null +++ b/src/api/app.ts @@ -0,0 +1,48 @@ +import wechatOa from '@/utils/wechat' +import request from '@/utils/request' + +//发送短信 +export function smsSend(data: any) { + return request.post({ url: '/index/sendSms', data: data }) +} + +export function getConfig(data: any) { + return request.get({ url: '/index/config', data }) +} + +export function getPolicy(data: any) { + return request.get({ url: '/index/policy', data: data }) +} + +export function uploadImage(file: any, token?: string) { + return request.uploadFile({ + url: '/upload/image', + filePath: file, + name: 'file', + header: { + token + }, + fileType: 'image' + }) +} + +export function uploadFile( + type: 'image' | 'file' | 'video', + options: Omit, + onProgress?: (progress: number) => void +) { + return request.uploadFile( + { ...options, url: `/upload/${type}`, name: 'file' }, + { + onProgress + } + ) +} + +export function wxJsConfig(data: any) { + return request.get({ url: '/wechat/jsConfig', data }) +} + +export function getMnpQrCode(data: any) { + return request.post({ url: '/wechat/getMnpQrCode', data: data }) +} \ No newline at end of file diff --git a/src/api/chat.ts b/src/api/chat.ts new file mode 100644 index 0000000..576ea98 --- /dev/null +++ b/src/api/chat.ts @@ -0,0 +1,130 @@ +import request, { RequestEventStreamConfig } from '@/utils/request' + +//获取技能列表 +export function getSkillLists(data: any) { + return request.get({ url: '/ai/skill', data }) +} +//获取创作列表 +export function getCreationLists(data: { keyword: string }) { + return request.get({ url: '/ai/creation', data }) +} + +export function getSamplesLists() { + return request.get({ url: '/ai/question' }) +} + +export function questionChat(data: any) { + return request.post({ url: '/chat_records/chat', data }, { isAuth: true }) +} + +// 对话记录 +export function getChatRecord(data: any) { + return request.get({ + url: '/chats/chatRecord', + data + }) +} + +//清空会话 +export function cleanChatRecord(data: any) { + return request.post( + { + url: '/chats/chatClean', + data + }, + { isAuth: true } + ) +} + +//清空会话 +export function delChatRecord(data: any) { + return request.post( + { + url: '/chats/record/del', + data + }, + { isAuth: true } + ) +} + +//收藏 +export function collectChatRecord(data: any) { + return request.post({ url: '/chats/addCollect', data }, { isAuth: true }) +} +//取消收藏 +export function cancelCollectChatRecord(data: any) { + return request.post({ url: '/chats/cancelCollect', data }, { isAuth: true }) +} + +//收藏列表 +export function getCollectChatRecordLists(data: any) { + return request.get({ url: '/chats/listCollect', data }) +} + +export function getCreationDetail(data: any) { + return request.get({ url: '/ai/creation/detail', data }) +} + +export function getSkillDetail(data: any) { + return request.get({ url: '/ai/skill/detail', data }) +} + +export function chatSendText(data: any, config: RequestEventStreamConfig) { + return request.eventStream({ url: '/chats/chatSend', data, method: 'POST' }, config) +} + +// 对话分类列表 +export function getChatCategoryLists(data: any) { + return request.get({ url: '/ai/category', data }) +} + +// 对话分类新增 +export function chatCategoryAdd(data: any) { + return request.post({ url: '/ai/category/add', data }, { isAuth: true }) +} + +// 对话分类编辑 +export function chatCategoryEdit(data: any) { + return request.post({ url: '/ai/category/update', data }, { isAuth: true }) +} + +// 对话分类删除 +export function chatCategoryDelete(data: any) { + return request.post({ url: '/ai/category/del', data }, { isAuth: true }) +} + +// 对话分类清空 +export function chatCategoryClear() { + return request.post({ url: '/ai/category/delAll' }, { isAuth: true }) +} + +// 创作 +export function creationChat(data: any, config: RequestEventStreamConfig) { + return request.eventStream({ url: '/chat/creationChat', data, method: 'POST' }, config) +} + +//获取聊天模型接口 +export function getChatModelApi() { + return request.get({ url: '/chats/getChatBillingConfigList' }) +} + +export function getChatBroadcast(data: any) { + return request.post({ url: '/voice/execute', data }) +} + +export function getChatVoiceGenerate(data: any) { + return request.post({ url: '/chats/voiceGenerate', data }) +} + +export function audioTransfer(filePath: string, formData: Record) { + return request.uploadFile({ + url: '/voice/voiceTransfer', + filePath, + formData, + name: 'file' + }) +} + +export function getPlugLists() { + return request.get({ url: '/chats/plugLists' }) +} diff --git a/src/api/drawing.ts b/src/api/drawing.ts new file mode 100644 index 0000000..997aafc --- /dev/null +++ b/src/api/drawing.ts @@ -0,0 +1 @@ +import request, { RequestEventStreamConfig } from '@/utils/request' export type DrawingFormType = { prompt: string // 是 关键词 action: string // 是 操作 generate=生成图片 upsample{index}=放大 variation{index}=变换 imageBase: string // 否 图片地址 图生成图时必填 imageId: string // 否 图片id 图片放大或变换时必填 model: string // 是 绘画的模型 version: string // 是 版本 scale: string // 否 图片比例 no_content: string // 否 忽略的关键词 other: string // 否 其它参数 style: string // 否 风格 动漫-default 可爱-cute 丰富-expressive 风景-scenic engine: string // 否 意间sd-绘画引擎 quality: string // 否 DALLE-3 画质 } // 生成图片 export function drawing(data: DrawingFormType) { return request.post({ url: '/draw/execute', data, method: 'POST' }) } // 生成图片详情 export function drawingDetail(data: number[]) { return request.post({ url: '/draw/records/detail', data }) } // 生成图片记录 export function drawingRecord(data: any) { return request.get({ url: '/draw/records/list', data }) } // 删除 export function drawingDelete(data: number[]) { return request.post({ url: '/draw/records/del', data, method: 'POST' }) } // 关键词分类 export function keywordCate() { return request.get({ url: '/draw/category/get' }) } // 关键词 export function keywordPrompt(data: any) { return request.get({ url: '/draw/prompt/get', data }) } // 绘画示例 export function drawingExample() { return request.get({ url: '/draw/prompt/example/get' }) } // 关键词翻译 export function keywordPromptTranslate(data: any) { return request.post({ url: '/draw/translate', data, method: 'POST' }) } // 绘画模型 export function drawingModel() { return request.get({ url: '/draw/getDrawBillingConfig' }) } // 意间绘画风格选择 export function yjStyleSelector() { return request.get({ url: '/draw/getSelector' }) } // SD export function sdModelList() { return request.get({ url: '/draw/sd/getModel' }) } \ No newline at end of file diff --git a/src/api/member.ts b/src/api/member.ts new file mode 100644 index 0000000..dc1ace8 --- /dev/null +++ b/src/api/member.ts @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +export function getMemberLists() { + return request.get({ url: '/member/packageList' }, { isAuth: true }) +} + +export function getCommentLists(data: any) { + return request.get({ url: '/member/commentList', data }, { isAuth: true }) +} + +export function memberBuy(data: any) { + return request.post({ url: '/member/buy', data }, { isAuth: true }) +} + +export function getMemberBuyLog(data?: any) { + return request.get({ url: '/member/buyLog', data }, { isAuth: true }) +} diff --git a/src/api/news.ts b/src/api/news.ts new file mode 100644 index 0000000..72cc346 --- /dev/null +++ b/src/api/news.ts @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +/** + * @description 获取文章分类 + * @return { Promise } + */ +export function getArticleCate() { + return request.get({ url: '/article/category' }) +} + +/** + * @description 获取文章列表 + * @return { Promise } + */ +export function getArticleList(data: Record) { + return request.get({ url: '/article/list', data: data }) +} + +/** + * @description 获取文章详情 + * @param { number } id + * @return { Promise } + */ +export function getArticleDetail(data: { id: number }) { + return request.get({ url: '/article/detail', data: data }) +} + +/** + * @description 加入收藏 + * @param { number } articleId + * @return { Promise } + */ +export function addCollect(data: { articleId: number }) { + return request.post({ url: '/article/collectAdd', data: data }, { isAuth: true }) +} + +/** + * @description 取消收藏 + * @param { number } id + * @return { Promise } + */ +export function cancelCollect(data: { articleId: number }) { + return request.post({ url: '/article/collectCancel', data: data }, { isAuth: true }) +} + +/** + * @description 获取收藏列表 + * @return { Promise } + */ +export function getCollect() { + return request.get({ url: '/article/collectList' }) +} diff --git a/src/api/pay.ts b/src/api/pay.ts new file mode 100644 index 0000000..cf56c8b --- /dev/null +++ b/src/api/pay.ts @@ -0,0 +1,16 @@ +import request from '@/utils/request' + +//支付方式 +export function getPayWay(data: any) { + return request.get({ url: '/pay/payWay', data }, { isAuth: true }) +} + +// 预支付 +export function prepay(data: any) { + return request.post({ url: '/pay/prepay', data }, { isAuth: true }) +} + +// 预支付 +export function getPayResult(data: any) { + return request.get({ url: '/pay/payStatus', data }, { isAuth: true }) +} diff --git a/src/api/promotion.ts b/src/api/promotion.ts new file mode 100644 index 0000000..34a554e --- /dev/null +++ b/src/api/promotion.ts @@ -0,0 +1,55 @@ +import request from '@/utils/request' + +// 分销中心 +export function getDistributionIndex(data?: any) { + return request.get({ url: '/distribution/center', data }, { isAuth: true }) +} + +// 分销申请 +export function distributionApply(data: any) { + return request.post( + { url: '/distribution/apply', data }, + { isAuth: true } + ) +} + +// 分销订单 +export function distributionOrder(data?: any) { + return request.get( + { url: '/distribution/order/list', data }, + { isAuth: true } + ) +} + +// 粉丝列表 +export function distributionFans(data?: any) { + return request.get( + { url: '/distribution/user/invite/list', data }, + { isAuth: true } + ) +} + +// 提现 --------------------------------------------------------------------------------- +export type WithdrawApplyType = { + money: string | number // 提现金额 + account: string | number // 支付宝账号 + realName: string | number // 支付宝姓名 + type: string | number + moneyQrcode: string[] | string +} +// 提现申请 +export function withdrawApply(data: WithdrawApplyType) { + return request.post({ url: '/distribution/withdrawal/apply', data }, { isAuth: true }) +} + +// 提现记录 +export function withdrawList(data?: { pageNo: number; pageSize: number }) { + return request.get({ url: '/distribution/pc/withdrawal/list', data }, { isAuth: true }) +} + +export function accountLog(data?: any) { + return request.get( + { url: '/distribution/getRevenueDetails', data }, + { isAuth: true } + ) +} \ No newline at end of file diff --git a/src/api/qrcode.ts b/src/api/qrcode.ts new file mode 100644 index 0000000..7876cc1 --- /dev/null +++ b/src/api/qrcode.ts @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +export type QrcodeFormType = { + model: string // 是 绘画模型 + type: number // 是 生成模式 1-文本模式 2-图片模式 + way: number // 是 生成模式 1-自定义(模型) 2-模板 + qr_content: string // 否 二维码内容 (文本模式时必填) + qr_image: string // 否 二维码图片 (图片模式时必填) + prompt: string // 否 关键词 + prompt_params: PromptParams | string // 否 其他参数 + model_id: string | number // 否 模型id + template_name: string // 否 模板名称 + template_id: string | number // 否 模板id + aspect_ratio: string | number // 否 比例 (知数云) + pixel_style: string | number // 否 码点形状(知数云) + marker_shape: string | number // 否 码眼选择(知数云) +} + +export type PromptParams = { + v: string // 版本取值枚举 2 1.1 1) 示例:--v 2 --v 1.1 + iw: number // (明显程序取值范围 0 - 1, 保留两位小数) 示例: --iw 0.45 + seed: string // (取值范围1 - 999999999 ) 示例: --seed 123 + shape: string // (码眼选择范围) ["square", "circle", "plus", "box", "octagon", "random", "tiny-plus"], 示例 --shape random ,默认为 random + ar: string // (尺寸选择) 范围 ["1:1", "9:16", "16:9", "3:4","4:3"] 示例 --ar 1:1 ,默认为 1:1 +} + +// 获取艺术二维码配置 +export function qrcodeConfig() { + return request.get({ url: '/qrcode/config' }) +} + +// 生成艺术二维码 +export function qrcodeImagine(data: QrcodeFormType) { + return request.post({ url: '/qrcode/execute', data, method: 'POST' }) +} + +// 生成艺术二维码详情 +export function qrcodeDetail(data: { records_id: number[] }) { + return request.post({ url: '/qrcode/records/detail', data }) +} + +// 生成艺术二维码记录 +export function qrcodeRecord(data: any) { + return request.get( + { + url: '/qrcode/records/list', + data + }, + { ignoreCancel: true } + ) +} + +// 删除 +export function qrcodeDelete(data: number[]) { + return request.post({ + url: '/qrcode/records/del', + data, + method: 'POST' + }) +} diff --git a/src/api/recharge.ts b/src/api/recharge.ts new file mode 100644 index 0000000..535bb0b --- /dev/null +++ b/src/api/recharge.ts @@ -0,0 +1,21 @@ +import request from '@/utils/request' + +//充值 +export function recharge(data: any) { + return request.post({ url: '/recharge/placeOrder', data }, { isAuth: true }) +} + +//充值记录 +export function rechargeRecord(data: any) { + return request.get({ url: '/recharge/record', data }, { isAuth: true }) +} + +// 充值配置 +export function rechargeConfig() { + return request.get({ url: '/recharge/config' }, { isAuth: true }) +} + +// 充值配置 +export function getRechargeConfig() { + return request.get({ url: '/recharge/rechargePackage' }, { isAuth: true }) +} diff --git a/src/api/redeem_code.ts b/src/api/redeem_code.ts new file mode 100644 index 0000000..308e56b --- /dev/null +++ b/src/api/redeem_code.ts @@ -0,0 +1 @@ +import request from '@/utils/request' export type RedeemCodeResponse = { content: string // 卡密内容 failure_time: string // 失效时间 id: string | number // 卡密ID sn: string | number // 卡密编号 type: string // 卡密类型 type_desc: string // 卡密类型说明 } /** * @description 卡密查询 * @return { RedeemCodeResponse } * @param data */ export function checkRedeemCode(data: { sn: number | string }): Promise { return request.get({ url: '/card_code/record/get', data: data }) } /** * @description 卡密兑换 * @param data */ export function useRedeemCode(data: { sn: number | string }) { return request.post({ url: '/card_code/record/use', data: data }) } \ No newline at end of file diff --git a/src/api/shop.ts b/src/api/shop.ts new file mode 100644 index 0000000..478ba2c --- /dev/null +++ b/src/api/shop.ts @@ -0,0 +1,16 @@ +import { client } from '@/utils/client' +import request from '@/utils/request' + +//首页数据 +export function getIndex() { + return request.get({ url: '/index/index' }) +} + +// 装修页面 +export function getDecorate(data: any) { + return request.get({ url: '/index/decorate', data }, { ignoreCancel: true }) +} + +export function addVisit() { + return request.post({ url: '/index/visit/add', data: { terminal: client } }) +} diff --git a/src/api/square.ts b/src/api/square.ts new file mode 100644 index 0000000..4f9890d --- /dev/null +++ b/src/api/square.ts @@ -0,0 +1 @@ +import request from '@/utils/request' /** * @description 绘画广场列表 * @return { Promise } * @param params */ export function getDrawSquareLists(data?: any) { return request.get({ url: '/draw/square/list', data }) } /** * @description 绘画广场列表 * @return { Promise } */ export function getDrawSquareCateLists() { return request.get({ url: '/draw/square/category/list' }) } /** * @description 分享至绘画广场 * @return { Promise } */ export function shareDrawSquare(data: any) { return request.post({ url: '/draw/square/add', data }) } /** * @description 喜欢绘画 * @return { Promise } */ export function collectDraw(data: any) { return request.post({ url: '/draw/square/collect', data }) } /** * @description 取消喜欢绘画 * @return { Promise } */ export function cancelCollectDraw(data: any) { return request.post({ url: '/draw/square/cancelCollect', data }) } \ No newline at end of file diff --git a/src/api/task.ts b/src/api/task.ts new file mode 100644 index 0000000..1c54450 --- /dev/null +++ b/src/api/task.ts @@ -0,0 +1,25 @@ +import request from '@/utils/request' + +export function getShareId() { + return request.post({ url: '/share/share' }) +} + +export function shareClick(data: any) { + return request.post({ url: '/share/click', data }) +} + +export function bindInvite(data: any, token: string) { + return request.post({ url: '/share/invite', data, header: { token } }) +} + +export function bindRegisterInvite(data: any) { + return request.post({ url: '/share/register/invite', data }) +} + +export function getTask() { + return request.get({ url: '/rewards/task' }) +} + +export function signClick() { + return request.post({ url: '/sign/click' }) +} diff --git a/src/api/user.ts b/src/api/user.ts new file mode 100644 index 0000000..c46e6ad --- /dev/null +++ b/src/api/user.ts @@ -0,0 +1,58 @@ +import request from '@/utils/request' + +export function getUserCenter(header?: any) { + return request.get({ url: '/user/center', header }) +} + +// 个人信息 +export function getUserInfo() { + return request.get({ url: '/user/info' }, { isAuth: true }) +} + +// 个人编辑 +export function userEdit(data: any) { + return request.post({ url: '/user/edit', data }, { isAuth: true }) +} + +// 绑定手机 +export function userBindMobile(data: any, header?: any) { + return request.post({ url: '/login/bindMobile', data, header }, { isAuth: true }) +} + +// 微信电话 +export function userMnpMobile(data: any, header?: any) { + return request.post({ url: '/user/mnpMobile', data, header }, { isAuth: true }) +} +export function userChangePwd(data: any) { + return request.post({ url: '/user/changePwd', data }, { isAuth: true }) +} + +// 绑定小程序 +export function mnpAuthBind(data: any) { + return request.post({ url: '/user/bindMnp', data }) +} + +// 绑定公众号 +export function oaAuthBind(data: any) { + return request.post({ url: '/user/bindOa', data }) +} + +//更新微信小程序头像昵称 +export function updateUser(data: Record, header: any) { + return request.post({ url: '/user/updateUser', data, header }) +} + +//余额明细 +export function accountLog(data: any) { + return request.get({ url: '/logs/userMoney', data }) +} + +//一键反馈 +export function feedbackPost(data: any) { + return request.post({ url: '/feedback/add', data }) +} + +//注销账号 +export function cancelled(data?: any) { + return request.post({ url: '/login/cancelled', data }) +} \ No newline at end of file diff --git a/src/components/agreement/agreement.vue b/src/components/agreement/agreement.vue new file mode 100644 index 0000000..199bb33 --- /dev/null +++ b/src/components/agreement/agreement.vue @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/audio-play/audio-play.vue b/src/components/audio-play/audio-play.vue new file mode 100644 index 0000000..b4b921e --- /dev/null +++ b/src/components/audio-play/audio-play.vue @@ -0,0 +1,135 @@ + + + + diff --git a/src/components/avatar-upload/avatar-upload.vue b/src/components/avatar-upload/avatar-upload.vue new file mode 100644 index 0000000..07eb3f4 --- /dev/null +++ b/src/components/avatar-upload/avatar-upload.vue @@ -0,0 +1,111 @@ + + + + diff --git a/src/components/chat-plugins/chat-plugins.vue b/src/components/chat-plugins/chat-plugins.vue new file mode 100644 index 0000000..8d44669 --- /dev/null +++ b/src/components/chat-plugins/chat-plugins.vue @@ -0,0 +1,166 @@ + + + + diff --git a/src/components/chat-plugins/vip-use.vue b/src/components/chat-plugins/vip-use.vue new file mode 100644 index 0000000..1106541 --- /dev/null +++ b/src/components/chat-plugins/vip-use.vue @@ -0,0 +1,61 @@ + + + diff --git a/src/components/chat-record-item/chat-record-item.vue b/src/components/chat-record-item/chat-record-item.vue new file mode 100644 index 0000000..4ab6f1f --- /dev/null +++ b/src/components/chat-record-item/chat-record-item.vue @@ -0,0 +1,305 @@ + + + + + diff --git a/src/components/chat-record-item/record-file.vue b/src/components/chat-record-item/record-file.vue new file mode 100644 index 0000000..7f615a0 --- /dev/null +++ b/src/components/chat-record-item/record-file.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/components/chat-record-item/record-image.vue b/src/components/chat-record-item/record-image.vue new file mode 100644 index 0000000..84e45c6 --- /dev/null +++ b/src/components/chat-record-item/record-image.vue @@ -0,0 +1,34 @@ + + + diff --git a/src/components/chat-record-item/text-item.vue b/src/components/chat-record-item/text-item.vue new file mode 100644 index 0000000..c96e1cb --- /dev/null +++ b/src/components/chat-record-item/text-item.vue @@ -0,0 +1,91 @@ + + + diff --git a/src/components/chat-scroll-view/chat-scroll-view.vue b/src/components/chat-scroll-view/chat-scroll-view.vue new file mode 100644 index 0000000..dd77c2f --- /dev/null +++ b/src/components/chat-scroll-view/chat-scroll-view.vue @@ -0,0 +1,865 @@ + + + + + diff --git a/src/components/chat-scroll-view/components/app-chat.vue b/src/components/chat-scroll-view/components/app-chat.vue new file mode 100644 index 0000000..a560859 --- /dev/null +++ b/src/components/chat-scroll-view/components/app-chat.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/src/components/chat-scroll-view/components/online-voice.vue b/src/components/chat-scroll-view/components/online-voice.vue new file mode 100644 index 0000000..a69ac00 --- /dev/null +++ b/src/components/chat-scroll-view/components/online-voice.vue @@ -0,0 +1,431 @@ + + + + + diff --git a/src/components/chat-scroll-view/components/request/http.ts b/src/components/chat-scroll-view/components/request/http.ts new file mode 100644 index 0000000..c8b97ab --- /dev/null +++ b/src/components/chat-scroll-view/components/request/http.ts @@ -0,0 +1,202 @@ +import { merge } from 'lodash-es' +import {Base64} from 'js-base64' +import { useUserStore } from '@/stores/user' +import type { + HttpRequestOptions, + RequestConfig, + RequestEventStreamConfig, + RequestHooks, + RequestOptions +} from './type' +import { RequestCodeEnum, RequestMethodsEnum } from '@/enums/requestEnums' + +function isStreamResponse(contentType?: string) { + if (typeof contentType !== 'string') return false + return contentType.includes('text/event-stream') +} + +const requestHooks: RequestHooks = { + requestInterceptorsHook(options, config) { + const { urlPrefix, baseUrl, withToken } = config + options.header = options.header || {} + if (urlPrefix) { + options.url = `${urlPrefix}${options.url}` + } + if (baseUrl) { + options.url = `${baseUrl}${options.url}` + } + const token = config.token + + options.header['terminal'] = config!.terminal + // 添加token + if (withToken && !options.header.token) { + options.header['ai-token'] = token + } + return options + }, + async responseInterceptorsHook(response, config, options) { + const { isTransformResponse, isReturnDefaultResponse, isAuth } = config + + //返回默认响应,当需要获取响应头及其他数据时可使用 + if (isReturnDefaultResponse) { + return response + } + // 是否需要对数据进行处理 + if (!isTransformResponse) { + return response.data + } + // const { logout } = useUserStore() + const { code, data, msg, show } = response.data as any + switch (code) { + case RequestCodeEnum.SUCCESS: + // msg && show && uni.$u.toast(msg) + return data + case RequestCodeEnum.FAILED: + // msg && uni.$u.toast(msg) + return Promise.reject(msg) + + case RequestCodeEnum.TOKEN_INVALID: + // logout() + if (isAuth && options.method?.toUpperCase() !== 'GET') { + // router.navigateTo({ path: '/pages/login/login' }) + } + return Promise.reject(msg) + + default: + return data + } + }, + async responseInterceptorsCatchHook(options, error) { + if (options.method?.toUpperCase() == RequestMethodsEnum.POST) { + // uni.$u.toast('请求失败,请重试') + } + return error + } +} + +export const defaultOptions: HttpRequestOptions = { + requestOptions: { + timeout: 30 * 1000 + }, + // baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, + baseUrl: '', + + //是否返回默认的响应 + isReturnDefaultResponse: false, + // 需要对返回数据进行处理 + isTransformResponse: true, + // 接口拼接地址 + urlPrefix: 'api', + // 忽略重复请求 + ignoreCancel: false, + // 是否携带token + withToken: true, + isAuth: false, + retryCount: 2, + retryTimeout: 1000, + requestHooks: requestHooks, + token: '' +} + +export const eventStream = ( + options: RequestOptions, + config: RequestEventStreamConfig +) => { + let mergeOptions = merge({}, defaultOptions.requestOptions, options) + + const mergeConfig: RequestEventStreamConfig = merge( + {}, + defaultOptions, + config + ) + const { requestInterceptorsHook, responseInterceptorsHook } = + mergeConfig.requestHooks || {} + + // if (requestInterceptorsHook && isFunction(requestInterceptorsHook)) { + mergeOptions = requestInterceptorsHook( + mergeOptions, + mergeConfig as RequestConfig + ) + // } + + let body: any = undefined + body = JSON.stringify(mergeOptions.data) + + const { onmessage, onclose, onstart } = config + + const decoder = new TextDecoder() + const push = async (controller: any, reader: any) => { + try { + const { value, done } = await reader.read() + if (done) { + controller.close() + onclose?.() + } else { + const tempval = Base64.decode(decoder.decode(value)) + onmessage?.(tempval) + controller.enqueue(value) + push(controller, reader) + } + } catch (error) { + onclose?.() + } + } + + return new Promise((resolve, reject) => { + console.log('asdas-----------------d', JSON.stringify(mergeOptions)) + fetch(mergeOptions.url, { + ...mergeOptions, + body, + headers: { + 'content-type': 'application/json; charset=utf-8', + Accept: 'text/event-stream', + ...mergeOptions.header + } + }) + .then(async (response) => { + if (response.status == 200) { + if ( + isStreamResponse(response.headers?.get('content-type')!) + ) { + const reader = response.body!.getReader() + // console.log(reader) + onstart?.(reader) + new ReadableStream({ + start(controller) { + push(controller, reader) + } + }) + } else { + //@ts-ignore + response.data = await response.json() + return response + } + } else { + reject(response.statusText) + } + }) + .then(async (response: any) => { + if (!response) { + resolve(response) + return + } + if (responseInterceptorsHook) { + try { + response = await responseInterceptorsHook( + response, + mergeConfig as RequestConfig, + mergeOptions + ) + resolve(response) + } catch (error) { + reject(error) + } + return + } + resolve(response) + }) + .catch((error) => { + reject(error) + }) + }) +} diff --git a/src/components/chat-scroll-view/components/request/index.ts b/src/components/chat-scroll-view/components/request/index.ts new file mode 100644 index 0000000..4caa99a --- /dev/null +++ b/src/components/chat-scroll-view/components/request/index.ts @@ -0,0 +1,13 @@ +import { eventStream } from './http' + +export const getChat = (data: any, config: any) => { + console.log('qweqwe----------------', config) + return eventStream( + { + url: '/chats/chatSend', + data, + method: 'POST' + }, + config + ) +} diff --git a/src/components/chat-scroll-view/components/request/type.d.ts b/src/components/chat-scroll-view/components/request/type.d.ts new file mode 100644 index 0000000..ed001ec --- /dev/null +++ b/src/components/chat-scroll-view/components/request/type.d.ts @@ -0,0 +1,44 @@ +export type RequestOptions = UniApp.RequestOptions +export type ResponseResult = + | UniApp.RequestSuccessCallbackResult + | UniApp.UploadFileSuccessCallbackResult +export type RequestOptionsResponseError = UniApp.GeneralCallbackResult +export type RequestTask = UniApp.RequestTask +export type UploadFileOption = UniApp.UploadFileOption +export interface HttpRequestOptions extends RequestConfig { + requestOptions: Partial +} + +export interface RequestConfig { + baseUrl: string + requestHooks: RequestHooks + isReturnDefaultResponse: boolean + isTransformResponse: boolean + urlPrefix: string + ignoreCancel: boolean + withToken: boolean + isAuth: boolean + retryCount: number + retryTimeout: number + hasRetryCount?: number + token: string +} + +export interface RequestEventStreamConfig extends Partial { + onstart?: (event: ReadableStreamDefaultReader | UniApp.RequestTask) => void + onmessage?: (value: string) => void + onclose?: () => void +} + +export interface RequestHooks { + requestInterceptorsHook?( + options: RequestOptions, + config: RequestConfig + ): RequestOptions + responseInterceptorsHook?( + response: ResponseResult, + config: RequestConfig, + options: RequestOptions + ): any + responseInterceptorsCatchHook?(options: RequestOptions, error: any): any +} diff --git a/src/components/dialog-poster/dialog-poster.vue b/src/components/dialog-poster/dialog-poster.vue new file mode 100644 index 0000000..8690496 --- /dev/null +++ b/src/components/dialog-poster/dialog-poster.vue @@ -0,0 +1,385 @@ + + + diff --git a/src/components/dragon-button/dragon-button.vue b/src/components/dragon-button/dragon-button.vue new file mode 100644 index 0000000..08a1e0a --- /dev/null +++ b/src/components/dragon-button/dragon-button.vue @@ -0,0 +1,150 @@ + + + + + diff --git a/src/components/drop-down/drop-down.vue b/src/components/drop-down/drop-down.vue new file mode 100644 index 0000000..af83eb6 --- /dev/null +++ b/src/components/drop-down/drop-down.vue @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/file-upload/choose-file.ts b/src/components/file-upload/choose-file.ts new file mode 100644 index 0000000..0b194ad --- /dev/null +++ b/src/components/file-upload/choose-file.ts @@ -0,0 +1,247 @@ +const ERR_MSG_FAIL = 'chooseFile:fail' +interface BaseOptions { + type: 'file' | 'image' | 'video' +} +type ChooseFileOptions = UniApp.ChooseFileOptions +type ChooseImageOptions = UniApp.ChooseImageOptions +type ChooseVideoOptions = UniApp.ChooseVideoOptions +type ChooseOptions = BaseOptions & + (ChooseFileOptions | ChooseImageOptions | ChooseVideoOptions) + +export interface ChooseResult { + tempFilePaths: string[] | string + tempFiles: any[] + errMsg?: string +} + +export interface FileData { + name: string + uuid: number + extname: string + fileType: string + url: string + path: string + size: string + progress: number + status: 'ready' | 'success' | 'error' + errMsg: string +} + +function chooseImage(opts: ChooseImageOptions) { + const { + count, + sizeType = ['original', 'compressed'], + sourceType, + extension + } = opts + return new Promise((resolve, reject) => { + uni.chooseImage({ + count, + sizeType, + sourceType, + extension, + success(res) { + resolve(normalizeFileRes(res as ChooseResult, 'image')) + }, + fail(res) { + reject({ + errMsg: res.errMsg.replace('chooseImage:fail', ERR_MSG_FAIL) + }) + } + }) + }) +} + +function chooseVideo(opts: ChooseVideoOptions) { + const { camera, compressed, maxDuration, sourceType, extension } = opts + return new Promise((resolve, reject) => { + uni.chooseVideo({ + camera, + compressed, + maxDuration, + sourceType, + extension, + success(res) { + const { tempFilePath, duration, size, height, width } = res + resolve( + normalizeFileRes( + { + errMsg: 'chooseVideo:ok', + tempFilePaths: [tempFilePath], + tempFiles: [ + { + name: + (res.tempFile && res.tempFile.name) || + '', + path: tempFilePath, + size, + type: + (res.tempFile && res.tempFile.type) || + '', + width, + height, + duration, + fileType: 'video' + } + ] + }, + 'video' + ) + ) + }, + fail(res) { + reject({ + errMsg: res.errMsg.replace('chooseVideo:fail', ERR_MSG_FAIL) + }) + } + }) + }) +} + +function chooseAll(opts: ChooseFileOptions) { + const { count, extension } = opts + return new Promise((resolve, reject) => { + let chooseFile = uni.chooseFile + if ( + typeof wx !== 'undefined' && + typeof wx.chooseMessageFile === 'function' + ) { + chooseFile = wx.chooseMessageFile + } + if (typeof chooseFile !== 'function') { + return reject({ + errMsg: + ERR_MSG_FAIL + + ' 请指定 type 类型,该平台仅支持选择 image 或 video。' + }) + } + chooseFile({ + type: 'all', + count, + extension, + success(res) { + resolve(normalizeFileRes(res as ChooseResult)) + }, + fail(res) { + reject({ + errMsg: res.errMsg.replace('chooseFile:fail', ERR_MSG_FAIL) + }) + } + }) + }) +} + +function normalizeFileRes(res: ChooseResult, fileType?: BaseOptions['type']) { + res.tempFiles.forEach((item) => { + if (!item.name) { + item.name = item.path.substring(item.path.lastIndexOf('/') + 1) + } + if (fileType) { + item.fileType = fileType + } + }) + if (!res.tempFilePaths) { + res.tempFilePaths = res.tempFiles.map((file) => file.path) + } + return res +} + +function chooseFile( + opts: ChooseOptions = { + type: 'file' + } +): Promise { + if (opts.type === 'image') { + return chooseImage(opts as ChooseImageOptions) + } else if (opts.type === 'video') { + return chooseVideo(opts as ChooseVideoOptions) + } + return chooseAll(opts as ChooseFileOptions) +} + +/** + * @description 获取文件扩展名和文件名 + * @param name + * @returns + */ +const getFileExt = (name: string) => { + const lastLen = name.lastIndexOf('.') + const len = name.length + const fileName = name.substring(0, lastLen) + const ext = name.substring(lastLen + 1, len) + return { + name: fileName, + ext + } +} +/** + * @description 路径中获取文件名称 + * @param name + * @returns + */ +const getFileName = (path: string) => { + const lastLen = path.lastIndexOf('.') + const lastPath = path.lastIndexOf('/') + // 不是文件 + if (lastLen === -1) return path + return path.substring(lastPath + 1) +} + +const normalizeFileData = (files: any) => { + const fileFullName = getFileExt(files.name) + const extname = fileFullName.ext.toLowerCase() + const filedata: FileData = { + name: files.name, + uuid: files.uuid, + extname: extname || '', + fileType: files.fileType, + path: files.path, + url: files.path, + size: files.size, + progress: 0, + status: 'ready', + errMsg: '' + } + return filedata +} + +// 检验扩展名是否正确 +const getFilesByExtname = (res: ChooseResult, extname: string[] = []) => { + const filePaths: any[] = [] + const files: any[] = [] + if (!extname.length) { + return { + filePaths: res.tempFilePaths, + files: res.tempFiles + } + } + res.tempFiles.forEach((v) => { + const fileFullName = getFileExt(v.name) + const ext = fileFullName.ext.toLowerCase() + if (extname.indexOf(ext) !== -1) { + files.push(v) + filePaths.push(v.path) + } + }) + if (files.length !== res.tempFiles.length) { + uni.showToast({ + title: `当前选择了${res.tempFiles.length}个文件 ,${ + res.tempFiles.length - files.length + } 个文件格式不正确`, + icon: 'none', + duration: 5000 + }) + } + return { + filePaths, + files + } +} + +export { + chooseFile, + getFileExt, + getFilesByExtname, + normalizeFileData, + getFileName +} diff --git a/src/components/file-upload/file-upload.vue b/src/components/file-upload/file-upload.vue new file mode 100644 index 0000000..9002fd3 --- /dev/null +++ b/src/components/file-upload/file-upload.vue @@ -0,0 +1,394 @@ + + + + diff --git a/src/components/floating-menu/floating-menu.vue b/src/components/floating-menu/floating-menu.vue new file mode 100644 index 0000000..47030ec --- /dev/null +++ b/src/components/floating-menu/floating-menu.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/src/components/guided-popup/guided-popup.vue b/src/components/guided-popup/guided-popup.vue new file mode 100644 index 0000000..0341ec7 --- /dev/null +++ b/src/components/guided-popup/guided-popup.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/components/l-textarea/l-textarea.vue b/src/components/l-textarea/l-textarea.vue new file mode 100644 index 0000000..d507e53 --- /dev/null +++ b/src/components/l-textarea/l-textarea.vue @@ -0,0 +1,90 @@ +