After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 71 KiB |
@ -0,0 +1,663 @@
|
|||||||
|
.uniui-color:before {
|
||||||
|
content: "\e6cf";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-wallet:before {
|
||||||
|
content: "\e6b1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-settings-filled:before {
|
||||||
|
content: "\e6ce";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-auth-filled:before {
|
||||||
|
content: "\e6cc";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-shop-filled:before {
|
||||||
|
content: "\e6cd";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-staff-filled:before {
|
||||||
|
content: "\e6cb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-vip-filled:before {
|
||||||
|
content: "\e6c6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-plus-filled:before {
|
||||||
|
content: "\e6c7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-folder-add-filled:before {
|
||||||
|
content: "\e6c8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-color-filled:before {
|
||||||
|
content: "\e6c9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-tune-filled:before {
|
||||||
|
content: "\e6ca";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-calendar-filled:before {
|
||||||
|
content: "\e6c0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-notification-filled:before {
|
||||||
|
content: "\e6c1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-wallet-filled:before {
|
||||||
|
content: "\e6c2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-medal-filled:before {
|
||||||
|
content: "\e6c3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gift-filled:before {
|
||||||
|
content: "\e6c4";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-fire-filled:before {
|
||||||
|
content: "\e6c5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-refreshempty:before {
|
||||||
|
content: "\e6bf";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-location-filled:before {
|
||||||
|
content: "\e6af";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-person-filled:before {
|
||||||
|
content: "\e69d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-personadd-filled:before {
|
||||||
|
content: "\e698";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-back:before {
|
||||||
|
content: "\e6b9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-forward:before {
|
||||||
|
content: "\e6ba";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-right:before {
|
||||||
|
content: "\e6bb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinright:before {
|
||||||
|
content: "\e6bb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-left:before {
|
||||||
|
content: "\e6bc";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinleft:before {
|
||||||
|
content: "\e6bc";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-up:before {
|
||||||
|
content: "\e6bd";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthinup:before {
|
||||||
|
content: "\e6bd";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrow-down:before {
|
||||||
|
content: "\e6be";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowthindown:before {
|
||||||
|
content: "\e6be";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-bottom:before {
|
||||||
|
content: "\e6b8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowdown:before {
|
||||||
|
content: "\e6b8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-right:before {
|
||||||
|
content: "\e6b5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowright:before {
|
||||||
|
content: "\e6b5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-top:before {
|
||||||
|
content: "\e6b6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowup:before {
|
||||||
|
content: "\e6b6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-left:before {
|
||||||
|
content: "\e6b7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-arrowleft:before {
|
||||||
|
content: "\e6b7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye:before {
|
||||||
|
content: "\e651";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye-filled:before {
|
||||||
|
content: "\e66a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye-slash:before {
|
||||||
|
content: "\e6b3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-eye-slash-filled:before {
|
||||||
|
content: "\e6b4";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-info-filled:before {
|
||||||
|
content: "\e649";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-reload:before {
|
||||||
|
content: "\e6b2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-micoff-filled:before {
|
||||||
|
content: "\e6b0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map-pin-ellipse:before {
|
||||||
|
content: "\e6ac";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map-pin:before {
|
||||||
|
content: "\e6ad";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-location:before {
|
||||||
|
content: "\e6ae";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-starhalf:before {
|
||||||
|
content: "\e683";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-star:before {
|
||||||
|
content: "\e688";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-star-filled:before {
|
||||||
|
content: "\e68f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-calendar:before {
|
||||||
|
content: "\e6a0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-fire:before {
|
||||||
|
content: "\e6a1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-medal:before {
|
||||||
|
content: "\e6a2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-font:before {
|
||||||
|
content: "\e6a3";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gift:before {
|
||||||
|
content: "\e6a4";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-link:before {
|
||||||
|
content: "\e6a5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-notification:before {
|
||||||
|
content: "\e6a6";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-staff:before {
|
||||||
|
content: "\e6a7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-vip:before {
|
||||||
|
content: "\e6a8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-folder-add:before {
|
||||||
|
content: "\e6a9";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-tune:before {
|
||||||
|
content: "\e6aa";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-auth:before {
|
||||||
|
content: "\e6ab";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-person:before {
|
||||||
|
content: "\e699";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-email-filled:before {
|
||||||
|
content: "\e69a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-phone-filled:before {
|
||||||
|
content: "\e69b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-phone:before {
|
||||||
|
content: "\e69c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-email:before {
|
||||||
|
content: "\e69e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-personadd:before {
|
||||||
|
content: "\e69f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatboxes-filled:before {
|
||||||
|
content: "\e692";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-contact:before {
|
||||||
|
content: "\e693";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatbubble-filled:before {
|
||||||
|
content: "\e694";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-contact-filled:before {
|
||||||
|
content: "\e695";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatboxes:before {
|
||||||
|
content: "\e696";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chatbubble:before {
|
||||||
|
content: "\e697";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-upload-filled:before {
|
||||||
|
content: "\e68e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-upload:before {
|
||||||
|
content: "\e690";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-weixin:before {
|
||||||
|
content: "\e691";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-compose:before {
|
||||||
|
content: "\e67f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-qq:before {
|
||||||
|
content: "\e680";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-download-filled:before {
|
||||||
|
content: "\e681";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-pyq:before {
|
||||||
|
content: "\e682";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-sound:before {
|
||||||
|
content: "\e684";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-trash-filled:before {
|
||||||
|
content: "\e685";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-sound-filled:before {
|
||||||
|
content: "\e686";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-trash:before {
|
||||||
|
content: "\e687";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-videocam-filled:before {
|
||||||
|
content: "\e689";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-spinner-cycle:before {
|
||||||
|
content: "\e68a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-weibo:before {
|
||||||
|
content: "\e68b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-videocam:before {
|
||||||
|
content: "\e68c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-download:before {
|
||||||
|
content: "\e68d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-help:before {
|
||||||
|
content: "\e679";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-navigate-filled:before {
|
||||||
|
content: "\e67a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-plusempty:before {
|
||||||
|
content: "\e67b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-smallcircle:before {
|
||||||
|
content: "\e67c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-minus-filled:before {
|
||||||
|
content: "\e67d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-micoff:before {
|
||||||
|
content: "\e67e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-closeempty:before {
|
||||||
|
content: "\e66c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-clear:before {
|
||||||
|
content: "\e66d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-navigate:before {
|
||||||
|
content: "\e66e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-minus:before {
|
||||||
|
content: "\e66f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-image:before {
|
||||||
|
content: "\e670";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mic:before {
|
||||||
|
content: "\e671";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-paperplane:before {
|
||||||
|
content: "\e672";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-close:before {
|
||||||
|
content: "\e673";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-help-filled:before {
|
||||||
|
content: "\e674";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-paperplane-filled:before {
|
||||||
|
content: "\e675";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-plus:before {
|
||||||
|
content: "\e676";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mic-filled:before {
|
||||||
|
content: "\e677";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-image-filled:before {
|
||||||
|
content: "\e678";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-locked-filled:before {
|
||||||
|
content: "\e668";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-info:before {
|
||||||
|
content: "\e669";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-locked:before {
|
||||||
|
content: "\e66b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-camera-filled:before {
|
||||||
|
content: "\e658";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chat-filled:before {
|
||||||
|
content: "\e659";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-camera:before {
|
||||||
|
content: "\e65a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-circle:before {
|
||||||
|
content: "\e65b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-checkmarkempty:before {
|
||||||
|
content: "\e65c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-chat:before {
|
||||||
|
content: "\e65d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-circle-filled:before {
|
||||||
|
content: "\e65e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-flag:before {
|
||||||
|
content: "\e65f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-flag-filled:before {
|
||||||
|
content: "\e660";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gear-filled:before {
|
||||||
|
content: "\e661";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-home:before {
|
||||||
|
content: "\e662";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-home-filled:before {
|
||||||
|
content: "\e663";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-gear:before {
|
||||||
|
content: "\e664";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-smallcircle-filled:before {
|
||||||
|
content: "\e665";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map-filled:before {
|
||||||
|
content: "\e666";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-map:before {
|
||||||
|
content: "\e667";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-refresh-filled:before {
|
||||||
|
content: "\e656";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-refresh:before {
|
||||||
|
content: "\e657";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-upload:before {
|
||||||
|
content: "\e645";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-download-filled:before {
|
||||||
|
content: "\e646";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-download:before {
|
||||||
|
content: "\e647";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cloud-upload-filled:before {
|
||||||
|
content: "\e648";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-redo:before {
|
||||||
|
content: "\e64a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-images-filled:before {
|
||||||
|
content: "\e64b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-undo-filled:before {
|
||||||
|
content: "\e64c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-more:before {
|
||||||
|
content: "\e64d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-more-filled:before {
|
||||||
|
content: "\e64e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-undo:before {
|
||||||
|
content: "\e64f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-images:before {
|
||||||
|
content: "\e650";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-paperclip:before {
|
||||||
|
content: "\e652";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-settings:before {
|
||||||
|
content: "\e653";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-search:before {
|
||||||
|
content: "\e654";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-redo-filled:before {
|
||||||
|
content: "\e655";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-list:before {
|
||||||
|
content: "\e644";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mail-open-filled:before {
|
||||||
|
content: "\e63a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-down-filled:before {
|
||||||
|
content: "\e63c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-down:before {
|
||||||
|
content: "\e63d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-up-filled:before {
|
||||||
|
content: "\e63e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-hand-up:before {
|
||||||
|
content: "\e63f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-heart-filled:before {
|
||||||
|
content: "\e641";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-mail-open:before {
|
||||||
|
content: "\e643";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-heart:before {
|
||||||
|
content: "\e639";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-loop:before {
|
||||||
|
content: "\e633";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-pulldown:before {
|
||||||
|
content: "\e632";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-scan:before {
|
||||||
|
content: "\e62a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-bars:before {
|
||||||
|
content: "\e627";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cart-filled:before {
|
||||||
|
content: "\e629";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-checkbox:before {
|
||||||
|
content: "\e62b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-checkbox-filled:before {
|
||||||
|
content: "\e62c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-shop:before {
|
||||||
|
content: "\e62f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-headphones:before {
|
||||||
|
content: "\e630";
|
||||||
|
}
|
||||||
|
|
||||||
|
.uniui-cart:before {
|
||||||
|
content: "\e631";
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"id": "uni-icons",
|
||||||
|
"displayName": "uni-icons 图标",
|
||||||
|
"version": "1.3.5",
|
||||||
|
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
|
||||||
|
"keywords": [
|
||||||
|
"uni-ui",
|
||||||
|
"uniui",
|
||||||
|
"icon",
|
||||||
|
"图标"
|
||||||
|
],
|
||||||
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
|
"engines": {
|
||||||
|
"HBuilderX": "^3.2.14"
|
||||||
|
},
|
||||||
|
"directories": {
|
||||||
|
"example": "../../temps/example_temps"
|
||||||
|
},
|
||||||
|
"dcloudext": {
|
||||||
|
"category": [
|
||||||
|
"前端组件",
|
||||||
|
"通用组件"
|
||||||
|
],
|
||||||
|
"sale": {
|
||||||
|
"regular": {
|
||||||
|
"price": "0.00"
|
||||||
|
},
|
||||||
|
"sourcecode": {
|
||||||
|
"price": "0.00"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"qq": ""
|
||||||
|
},
|
||||||
|
"declaration": {
|
||||||
|
"ads": "无",
|
||||||
|
"data": "无",
|
||||||
|
"permissions": "无"
|
||||||
|
},
|
||||||
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
|
||||||
|
},
|
||||||
|
"uni_modules": {
|
||||||
|
"dependencies": ["uni-scss"],
|
||||||
|
"encrypt": [],
|
||||||
|
"platforms": {
|
||||||
|
"cloud": {
|
||||||
|
"tcb": "y",
|
||||||
|
"aliyun": "y"
|
||||||
|
},
|
||||||
|
"client": {
|
||||||
|
"App": {
|
||||||
|
"app-vue": "y",
|
||||||
|
"app-nvue": "y"
|
||||||
|
},
|
||||||
|
"H5-mobile": {
|
||||||
|
"Safari": "y",
|
||||||
|
"Android Browser": "y",
|
||||||
|
"微信浏览器(Android)": "y",
|
||||||
|
"QQ浏览器(Android)": "y"
|
||||||
|
},
|
||||||
|
"H5-pc": {
|
||||||
|
"Chrome": "y",
|
||||||
|
"IE": "y",
|
||||||
|
"Edge": "y",
|
||||||
|
"Firefox": "y",
|
||||||
|
"Safari": "y"
|
||||||
|
},
|
||||||
|
"小程序": {
|
||||||
|
"微信": "y",
|
||||||
|
"阿里": "y",
|
||||||
|
"百度": "y",
|
||||||
|
"字节跳动": "y",
|
||||||
|
"QQ": "y"
|
||||||
|
},
|
||||||
|
"快应用": {
|
||||||
|
"华为": "u",
|
||||||
|
"联盟": "u"
|
||||||
|
},
|
||||||
|
"Vue": {
|
||||||
|
"vue2": "y",
|
||||||
|
"vue3": "y"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,194 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../common/vendor.js");
|
||||||
|
const config_index = require("../config/index.js");
|
||||||
|
const loginUrl = "pages/user/login";
|
||||||
|
const net = {
|
||||||
|
REQUEST(url, method = "GET", data, checkLogin = true, header) {
|
||||||
|
let token = common_vendor.index.getStorageSync("access_token") || "Basic ZGV20mRldjEyMw==";
|
||||||
|
const headers = {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"Authorization": token,
|
||||||
|
"x-token": token,
|
||||||
|
"token": token
|
||||||
|
// "X-Forwarded-For":'client_ip'
|
||||||
|
// 'Referer':'twzxjy.com'
|
||||||
|
};
|
||||||
|
var pages = getCurrentPages();
|
||||||
|
var page = pages[pages.length - 1];
|
||||||
|
if (!header) {
|
||||||
|
headers["Content-Type"] = "application/x-www-form-urlencode";
|
||||||
|
}
|
||||||
|
console.log("headers :", headers);
|
||||||
|
return common_vendor.index.request({
|
||||||
|
url: config_index.config.baseUrl + url,
|
||||||
|
method,
|
||||||
|
header: {
|
||||||
|
...header,
|
||||||
|
...headers
|
||||||
|
},
|
||||||
|
data
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.statusCode === 200 && res.data) {
|
||||||
|
if (res.data.code === 409) {
|
||||||
|
common_vendor.index.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "您的账号已在其他设备登录,已强制下线!",
|
||||||
|
confirmColor: "#006647",
|
||||||
|
showCancel: false,
|
||||||
|
success: (res2) => {
|
||||||
|
if (res2.confirm) {
|
||||||
|
common_vendor.index.removeStorageSync("access_token");
|
||||||
|
common_vendor.index.removeStorageSync("user_info");
|
||||||
|
if (checkLogin && page.route != loginUrl) {
|
||||||
|
common_vendor.index.navigateTo({
|
||||||
|
url: "/" + loginUrl
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
...res.data
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (res.data.code === 5) {
|
||||||
|
common_vendor.index.removeStorageSync("access_token");
|
||||||
|
if (page.route != loginUrl && checkLogin) {
|
||||||
|
common_vendor.index.navigateTo({
|
||||||
|
url: "/" + loginUrl
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res.data;
|
||||||
|
} else {
|
||||||
|
const reg = /abort/;
|
||||||
|
let code = 0;
|
||||||
|
let msg = res[0] && res[0].errMsg || "未知错误";
|
||||||
|
if (res[0] && res[0].errMsg && reg.test(res[0].errMsg)) {
|
||||||
|
msg = "网络请求中断";
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
code,
|
||||||
|
msg,
|
||||||
|
data: null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}).catch((parmas) => {
|
||||||
|
return parmas;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
GET(url, body, checkLogin = true, header) {
|
||||||
|
return this.REQUEST(url, "GET", body, checkLogin, header);
|
||||||
|
},
|
||||||
|
POST(url, body, checkLogin = true, header) {
|
||||||
|
return this.REQUEST(url, "POST", body, checkLogin, header);
|
||||||
|
},
|
||||||
|
PUT(url, body, header) {
|
||||||
|
return this.REQUEST(url, "PUT", body, header);
|
||||||
|
},
|
||||||
|
DELETE(url, body, header) {
|
||||||
|
return this.REQUEST(url, "DELETE", body, header);
|
||||||
|
},
|
||||||
|
UPLOAD(data) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let token = common_vendor.index.getStorageSync("access_token") || "";
|
||||||
|
common_vendor.index.uploadFile({
|
||||||
|
...data,
|
||||||
|
url: config_index.config.base_url + data.url,
|
||||||
|
header: {
|
||||||
|
"Access-Token": token
|
||||||
|
},
|
||||||
|
success(res) {
|
||||||
|
res.data = JSON.parse(res.data);
|
||||||
|
if (res.data.code === 401) {
|
||||||
|
common_vendor.index.removeStorageSync("access_token");
|
||||||
|
common_vendor.index.removeStorageSync("userInfo");
|
||||||
|
common_vendor.index.navigateTo({
|
||||||
|
url: "/pages/login/login"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
resolve(res);
|
||||||
|
},
|
||||||
|
fail(e) {
|
||||||
|
console.log(e);
|
||||||
|
reject(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getShareProvider: () => {
|
||||||
|
return common_vendor.index.getProvider({
|
||||||
|
service: "share"
|
||||||
|
}).then((res) => {
|
||||||
|
let data = [];
|
||||||
|
for (let i = 0; i < res.provider.length; i++) {
|
||||||
|
switch (res.provider[i]) {
|
||||||
|
case "weixin":
|
||||||
|
data.push({
|
||||||
|
name: "微信好友",
|
||||||
|
id: "weixin",
|
||||||
|
icon: "/static/wx.png"
|
||||||
|
});
|
||||||
|
data.push({
|
||||||
|
name: "朋友圈",
|
||||||
|
id: "weixin",
|
||||||
|
type: "WXSenceTimeline",
|
||||||
|
icon: "/static/pyq.png"
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "qq":
|
||||||
|
data.push({
|
||||||
|
name: "QQ好友",
|
||||||
|
id: "qq",
|
||||||
|
icon: "/static/qq.png"
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}).catch((parmas) => {
|
||||||
|
return Promise.reject();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getPaymentProvider: () => {
|
||||||
|
return common_vendor.index.getProvider({
|
||||||
|
service: "payment"
|
||||||
|
}).then((res) => {
|
||||||
|
let data = [];
|
||||||
|
const aliPay = {
|
||||||
|
name: "支付宝支付",
|
||||||
|
id: "alipay",
|
||||||
|
icon: "/static/order/zfbp@3x.png"
|
||||||
|
};
|
||||||
|
const wxPay = {
|
||||||
|
name: "微信支付",
|
||||||
|
id: "wxpay",
|
||||||
|
icon: "/static/order/wxp@3x.png"
|
||||||
|
};
|
||||||
|
const yuePay = {
|
||||||
|
name: "余额支付",
|
||||||
|
id: "yepay",
|
||||||
|
icon: "/static/order/yep@3x.png"
|
||||||
|
};
|
||||||
|
for (let i = 0; i < res[1].provider.length; i++) {
|
||||||
|
switch (res[1].provider[i]) {
|
||||||
|
case "alipay":
|
||||||
|
data.push({
|
||||||
|
...aliPay
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case "wxpay":
|
||||||
|
data.push({
|
||||||
|
...wxPay
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [...data, yuePay];
|
||||||
|
}).catch((parmas) => {
|
||||||
|
return Promise.reject();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
exports.net = net;
|
@ -0,0 +1,29 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||||
|
const common_vendor = require("./common/vendor.js");
|
||||||
|
if (!Math) {
|
||||||
|
"./pages/index/index.js";
|
||||||
|
"./pages/wikipedia/index.js";
|
||||||
|
"./pages/user/index.js";
|
||||||
|
}
|
||||||
|
const _sfc_main = {
|
||||||
|
onLaunch: function() {
|
||||||
|
console.log("App Launch");
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
console.log("App Show");
|
||||||
|
},
|
||||||
|
onHide: function() {
|
||||||
|
console.log("App Hide");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f13b4d11"], ["__file", "F:/项目2023/视力表/vision-record/App.vue"]]);
|
||||||
|
function createApp() {
|
||||||
|
const app = common_vendor.createSSRApp(App);
|
||||||
|
app.use(common_vendor.createPinia());
|
||||||
|
return {
|
||||||
|
app
|
||||||
|
};
|
||||||
|
}
|
||||||
|
createApp().app.mount("#app");
|
||||||
|
exports.createApp = createApp;
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"pages": [
|
||||||
|
"pages/index/index",
|
||||||
|
"pages/wikipedia/index",
|
||||||
|
"pages/user/index"
|
||||||
|
],
|
||||||
|
"window": {
|
||||||
|
"navigationBarTextStyle": "black",
|
||||||
|
"navigationBarTitleText": "uni-app",
|
||||||
|
"navigationBarBackgroundColor": "#F8F8F8",
|
||||||
|
"backgroundColor": "#F8F8F8"
|
||||||
|
},
|
||||||
|
"tabBar": {
|
||||||
|
"color": "#999999",
|
||||||
|
"selectedColor": "#26758d",
|
||||||
|
"borderStyle": "black",
|
||||||
|
"backgroundColor": "#ffffff",
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "pages/index/index",
|
||||||
|
"iconPath": "static/tabs/home.png",
|
||||||
|
"selectedIconPath": "static/tabs/home2.png",
|
||||||
|
"text": "首页"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/wikipedia/index",
|
||||||
|
"iconPath": "static/tabs/order.png",
|
||||||
|
"selectedIconPath": "static/tabs/order2.png",
|
||||||
|
"text": "百科"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/user/index",
|
||||||
|
"iconPath": "static/tabs/user.png",
|
||||||
|
"selectedIconPath": "static/tabs/user2.png",
|
||||||
|
"text": "我的"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../common/vendor.js");
|
||||||
|
const _sfc_main = {
|
||||||
|
__name: "mySwiper",
|
||||||
|
props: ["lbt_list", "height", "isRadius", "indicatorDots"],
|
||||||
|
setup(__props) {
|
||||||
|
const props = __props;
|
||||||
|
const interval = common_vendor.ref(2e3);
|
||||||
|
const autoplay = common_vendor.ref(true);
|
||||||
|
common_vendor.watch(() => {
|
||||||
|
return props.lbt_list;
|
||||||
|
}, (val1, val2) => {
|
||||||
|
});
|
||||||
|
function lbtFunc(item) {
|
||||||
|
common_vendor.index.navigateTo({
|
||||||
|
url: item.url
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return (_ctx, _cache) => {
|
||||||
|
return {
|
||||||
|
a: common_vendor.f(__props.lbt_list, (item, i, i0) => {
|
||||||
|
return {
|
||||||
|
a: item.image,
|
||||||
|
b: common_vendor.o(($event) => lbtFunc(item))
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
b: __props.isRadius ? 1 : "",
|
||||||
|
c: common_vendor.s("height: " + __props.height * 2 + "rpx;"),
|
||||||
|
d: __props.indicatorDots,
|
||||||
|
e: autoplay.value,
|
||||||
|
f: interval.value,
|
||||||
|
g: _ctx.duration
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/项目2023/视力表/vision-record/components/mySwiper.vue"]]);
|
||||||
|
wx.createComponent(Component);
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<view class="swiper-box"><view class="uni-margin-wrap"><swiper class="{{['swiper', b && 'radiuscss']}}" style="{{c}}" circular indicator-dots="{{d}}" autoplay="{{e}}" interval="{{f}}" duration="{{g}}"><swiper-item wx:for="{{a}}" wx:for-item="item" bindtap="{{item.b}}"><view class="swiper-item uni-bg-red"><image src="{{item.a}}" style="width:100%" mode="widthFix"></image></view></swiper-item></swiper></view></view>
|
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
.radiuscss{
|
||||||
|
border-radius:30rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.swiper-box{
|
||||||
|
}
|
||||||
|
.swiper-item>img{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.uni-margin-wrap {
|
||||||
|
width: 690rpx;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.swiper {
|
||||||
|
height: 300rpx;
|
||||||
|
}
|
||||||
|
.swiper-item {
|
||||||
|
display: block;
|
||||||
|
height: 300rpx;
|
||||||
|
line-height: 300rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.swiper-list {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.uni-common-mt {
|
||||||
|
margin-top: 60rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
position: absolute;
|
||||||
|
right: 20rpx;
|
||||||
|
}
|
||||||
|
.uni-padding-wrap {
|
||||||
|
width: 550rpx;
|
||||||
|
padding: 0 100rpx;
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
"use strict";
|
||||||
|
const isdev = true;
|
||||||
|
const baseUrl = "https://71e86bc1.r15.cpolar.top";
|
||||||
|
const shareUrl = "https://h5.gwkjxb.com/";
|
||||||
|
const teacher_admin_url = "http://teacher.gwkjxb.com/#/login";
|
||||||
|
const config = {
|
||||||
|
appName: "保护视力",
|
||||||
|
baseUrl,
|
||||||
|
appVersion: "1.0.6",
|
||||||
|
developer: "保护视力",
|
||||||
|
// appLogo: require('../static/logo.png'),
|
||||||
|
shareUrl,
|
||||||
|
teacher_admin_url,
|
||||||
|
appID: "wx2a050f9a5c87a6dc",
|
||||||
|
isdev
|
||||||
|
};
|
||||||
|
exports.config = config;
|
@ -0,0 +1,88 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const store_index = require("../../store/index.js");
|
||||||
|
require("../../api/index.js");
|
||||||
|
require("../../api/request.js");
|
||||||
|
require("../../config/index.js");
|
||||||
|
if (!Array) {
|
||||||
|
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||||
|
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||||
|
(_easycom_uni_icons2 + _easycom_uni_popup2)();
|
||||||
|
}
|
||||||
|
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||||
|
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||||
|
if (!Math) {
|
||||||
|
(mySwiper + _easycom_uni_icons + _easycom_uni_popup)();
|
||||||
|
}
|
||||||
|
const mySwiper = () => "../../components/mySwiper.js";
|
||||||
|
const _sfc_main = {
|
||||||
|
__name: "index",
|
||||||
|
setup(__props) {
|
||||||
|
const store = store_index.useStore();
|
||||||
|
common_vendor.onLoad((e) => {
|
||||||
|
var _a;
|
||||||
|
if (!((_a = store.userInfo) == null ? void 0 : _a.has_operation))
|
||||||
|
;
|
||||||
|
});
|
||||||
|
const inputDialog = common_vendor.ref();
|
||||||
|
common_vendor.ref();
|
||||||
|
common_vendor.ref(false);
|
||||||
|
const lbt_list = common_vendor.ref([
|
||||||
|
{
|
||||||
|
banner_name: "首页轮播2",
|
||||||
|
createtime: 1694851490,
|
||||||
|
deletetime: null,
|
||||||
|
id: 6,
|
||||||
|
image: "http://niunai.zhitou1688.com/uploads/20230922/ea3b3348df5d2b41eb49ddbf86b83516.png",
|
||||||
|
is_show: 1,
|
||||||
|
type: "index",
|
||||||
|
url: "",
|
||||||
|
weigh: 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
banner_name: "首页轮播2",
|
||||||
|
createtime: 1694851490,
|
||||||
|
deletetime: null,
|
||||||
|
id: 6,
|
||||||
|
image: "/static/vip2.png",
|
||||||
|
is_show: 1,
|
||||||
|
type: "index",
|
||||||
|
url: "",
|
||||||
|
weigh: 6
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
return (_ctx, _cache) => {
|
||||||
|
return {
|
||||||
|
a: common_vendor.p({
|
||||||
|
indicatorDots: true,
|
||||||
|
isRadius: true,
|
||||||
|
height: "160",
|
||||||
|
lbt_list: lbt_list.value
|
||||||
|
}),
|
||||||
|
b: common_vendor.p({
|
||||||
|
type: "forward",
|
||||||
|
color: "#ffa2a2",
|
||||||
|
size: "20"
|
||||||
|
}),
|
||||||
|
c: common_vendor.p({
|
||||||
|
type: "forward",
|
||||||
|
color: "#f9b275",
|
||||||
|
size: "20"
|
||||||
|
}),
|
||||||
|
d: common_vendor.p({
|
||||||
|
type: "forward",
|
||||||
|
color: "#8fdc8a",
|
||||||
|
size: "20"
|
||||||
|
}),
|
||||||
|
e: common_vendor.sr(inputDialog, "1cf27b2a-4", {
|
||||||
|
"k": "inputDialog"
|
||||||
|
}),
|
||||||
|
f: common_vendor.p({
|
||||||
|
["is-mask-click"]: false
|
||||||
|
})
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"], ["__file", "F:/项目2023/视力表/vision-record/pages/index/index.vue"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "首页",
|
||||||
|
"usingComponents": {
|
||||||
|
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
|
||||||
|
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
|
||||||
|
"my-swiper": "../../components/mySwiper"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<view class="content page-box data-v-1cf27b2a"><my-swiper wx:if="{{a}}" class="index-siwper margin-b-card data-v-1cf27b2a" style="width:100%" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{a}}"/><view class="main-cards data-v-1cf27b2a"><view class="mc-part data-v-1cf27b2a" style="margin-left:0"><view class="mc-part-text data-v-1cf27b2a">已完成事项</view><image class="data-v-1cf27b2a" src="/static/done.png" mode="widthFix"></image></view><view class="mc-part mc-part2 data-v-1cf27b2a" style="margin-right:0"><view class="mc-part-text data-v-1cf27b2a">待完成事项</view><image class="data-v-1cf27b2a" style="transform:rotate(0deg)" src="/static/undone.png" mode="widthFix"></image></view></view><view class="attention-card data-v-1cf27b2a"><view class="part-title data-v-1cf27b2a"> 注意事项 </view><view class="ac-parts data-v-1cf27b2a"><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #ffa2a2,#ffd3d3, #ffffff00)"> 术前注意事项 <uni-icons wx:if="{{b}}" class="data-v-1cf27b2a" u-i="1cf27b2a-1" bind:__l="__l" u-p="{{b}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #f9b275,#fff3e9, #ffffff00)"> 术中注意事项 <uni-icons wx:if="{{c}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" u-p="{{c}}"></uni-icons></view><view class="ac-part data-v-1cf27b2a" style="background:linear-gradient(45deg, #8fdc8a,#fdfdfd, #ffffff00)"> 术后注意事项 <uni-icons wx:if="{{d}}" class="data-v-1cf27b2a" u-i="1cf27b2a-3" bind:__l="__l" u-p="{{d}}"></uni-icons></view></view></view><uni-popup wx:if="{{f}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="inputDialog" u-i="1cf27b2a-4" bind:__l="__l" u-p="{{f}}"><view class="pop-box data-v-1cf27b2a"><view class="pb-title data-v-1cf27b2a">手术信息</view></view><view class="pop-close data-v-1cf27b2a"> 关闭 </view></uni-popup></view>
|
@ -0,0 +1,48 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const store_index = require("../../store/index.js");
|
||||||
|
const api_index = require("../../api/index.js");
|
||||||
|
require("../../api/request.js");
|
||||||
|
require("../../config/index.js");
|
||||||
|
const _sfc_main = {
|
||||||
|
__name: "index",
|
||||||
|
setup(__props) {
|
||||||
|
store_index.useStore();
|
||||||
|
function getPhoneNumber(e) {
|
||||||
|
console.log(e);
|
||||||
|
getAccess_token({ code: e.detail.code });
|
||||||
|
}
|
||||||
|
async function getAccess_token(params = {}) {
|
||||||
|
const data = {
|
||||||
|
username: params.code,
|
||||||
|
//手机号按钮获取的code
|
||||||
|
type: "wechat_mini_app",
|
||||||
|
identity: "user",
|
||||||
|
password: "111"
|
||||||
|
};
|
||||||
|
await api_index.API.getToken(data);
|
||||||
|
wx_login();
|
||||||
|
}
|
||||||
|
async function wx_login(token_res) {
|
||||||
|
let res = await new Promise((resolve) => {
|
||||||
|
common_vendor.index.login({
|
||||||
|
provider: "weixin",
|
||||||
|
//使用微信登录
|
||||||
|
success: function(loginRes) {
|
||||||
|
resolve(loginRes);
|
||||||
|
console.log(loginRes, "微信登录返回信息");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let userId = "";
|
||||||
|
await api_index.API.wx_login({ code: res.code }, userId);
|
||||||
|
}
|
||||||
|
return (_ctx, _cache) => {
|
||||||
|
return {
|
||||||
|
a: common_vendor.o(getPhoneNumber)
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "F:/项目2023/视力表/vision-record/pages/user/index.vue"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "我的",
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<view class="user-box page-box"><button class="submit-btn" open-type="getPhoneNumber" bindgetphonenumber="{{a}}"><text>登录</text></button></view>
|
@ -0,0 +1,8 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const _sfc_main = {};
|
||||||
|
function _sfc_render(_ctx, _cache) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/项目2023/视力表/vision-record/pages/wikipedia/index.vue"]]);
|
||||||
|
wx.createPage(MiniProgramPage);
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "百科",
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"description": "项目配置文件。",
|
||||||
|
"packOptions": {
|
||||||
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
|
},
|
||||||
|
"setting": {
|
||||||
|
"urlCheck": false,
|
||||||
|
"es6": true,
|
||||||
|
"postcss": false,
|
||||||
|
"minified": false,
|
||||||
|
"newFeature": true,
|
||||||
|
"bigPackageSizeSupport": true,
|
||||||
|
"babelSetting": {
|
||||||
|
"ignore": [],
|
||||||
|
"disablePlugins": [],
|
||||||
|
"outputPath": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compileType": "miniprogram",
|
||||||
|
"libVersion": "3.1.2",
|
||||||
|
"appid": "wxaaf66dbb5c3983b3",
|
||||||
|
"projectname": "vision-record",
|
||||||
|
"condition": {},
|
||||||
|
"editorSetting": {
|
||||||
|
"tabIndent": "insertSpaces",
|
||||||
|
"tabSize": 2
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 968 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 126 KiB |
@ -0,0 +1,103 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../common/vendor.js");
|
||||||
|
const api_index = require("../api/index.js");
|
||||||
|
const useStore = common_vendor.defineStore("main2", {
|
||||||
|
state: () => {
|
||||||
|
return {
|
||||||
|
// 所有这些属性都将自动推断其类型
|
||||||
|
isLogin: false,
|
||||||
|
userInfo: null,
|
||||||
|
access_token: "",
|
||||||
|
historySearchWords: "",
|
||||||
|
course_detail_id: 0,
|
||||||
|
timer: null,
|
||||||
|
surplus_seconds: null,
|
||||||
|
// 倒计时
|
||||||
|
test_time: 0,
|
||||||
|
//测试用时
|
||||||
|
test_timer: null,
|
||||||
|
total_score: 0,
|
||||||
|
status_bar_height: 0,
|
||||||
|
debounceTimer: null,
|
||||||
|
systemInfo: null,
|
||||||
|
cartList: [],
|
||||||
|
cartChange: false,
|
||||||
|
remark_text: "",
|
||||||
|
address: ""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
//应用初始化,在这里获取必要的基础信息
|
||||||
|
appInit() {
|
||||||
|
const { statusBarHeight } = common_vendor.index.getSystemInfoSync();
|
||||||
|
this.status_bar_height = statusBarHeight;
|
||||||
|
},
|
||||||
|
countdownFunc(minutes) {
|
||||||
|
this.surplus_seconds = minutes * 60;
|
||||||
|
},
|
||||||
|
saveToken(token) {
|
||||||
|
common_vendor.index.setStorage({
|
||||||
|
key: "access_token",
|
||||||
|
data: token,
|
||||||
|
success: function() {
|
||||||
|
console.log("token was saved");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveVisitState() {
|
||||||
|
common_vendor.index.setStorage({
|
||||||
|
key: "visitState",
|
||||||
|
data: 1,
|
||||||
|
success: function() {
|
||||||
|
console.log("visitState was saved");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checkLogin() {
|
||||||
|
let access_token = common_vendor.index.getStorageSync("access_token");
|
||||||
|
console.log(access_token);
|
||||||
|
if (access_token) {
|
||||||
|
this.access_token = access_token;
|
||||||
|
this.isLogin = true;
|
||||||
|
this.getUserInfo();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getUserInfo() {
|
||||||
|
const res = await api_index.API.getUserInfo();
|
||||||
|
if (res.code == 1) {
|
||||||
|
this.userInfo = res.data;
|
||||||
|
common_vendor.index.setStorageSync("userInfo", res.data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
logout() {
|
||||||
|
this.userInfo = null;
|
||||||
|
this.isLogin = false;
|
||||||
|
common_vendor.index.removeStorageSync("access_token");
|
||||||
|
common_vendor.index.removeStorageSync("visitState");
|
||||||
|
},
|
||||||
|
clearStorageFunc() {
|
||||||
|
common_vendor.index.removeStorageSync("surplus_seconds");
|
||||||
|
common_vendor.index.removeStorageSync("test_time");
|
||||||
|
common_vendor.index.removeStorageSync("saved_right_indexs_storage");
|
||||||
|
},
|
||||||
|
toLogin() {
|
||||||
|
common_vendor.index.navigateTo({
|
||||||
|
url: "/pages/user/login"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
showMsg(msg, type) {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: msg,
|
||||||
|
icon: type || "none",
|
||||||
|
duration: 2e3
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getCartList() {
|
||||||
|
const res = await api_index.API.getCartList();
|
||||||
|
if (res.code === 1) {
|
||||||
|
this.cartList = res.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
exports.useStore = useStore;
|
@ -0,0 +1,64 @@
|
|||||||
|
"use strict";
|
||||||
|
const uni_modules_uniIcons_components_uniIcons_icons = require("./icons.js");
|
||||||
|
const common_vendor = require("../../../../common/vendor.js");
|
||||||
|
require("../../../../app.js");
|
||||||
|
const getVal = (val) => {
|
||||||
|
const reg = /^[0-9]*$/g;
|
||||||
|
return typeof val === "number" || reg.test(val) ? val + "px" : val;
|
||||||
|
};
|
||||||
|
const _sfc_main = {
|
||||||
|
name: "UniIcons",
|
||||||
|
emits: ["click"],
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
default: "#333333"
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: [Number, String],
|
||||||
|
default: 16
|
||||||
|
},
|
||||||
|
customPrefix: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
icons: uni_modules_uniIcons_components_uniIcons_icons.icons.glyphs
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
unicode() {
|
||||||
|
let code = this.icons.find((v) => v.font_class === this.type);
|
||||||
|
if (code) {
|
||||||
|
return unescape(`%u${code.unicode}`);
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
iconSize() {
|
||||||
|
return getVal(this.size);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_onClick() {
|
||||||
|
this.$emit("click");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
|
return {
|
||||||
|
a: $props.color,
|
||||||
|
b: $options.iconSize,
|
||||||
|
c: common_vendor.n("uniui-" + $props.type),
|
||||||
|
d: common_vendor.n($props.customPrefix),
|
||||||
|
e: common_vendor.n($props.customPrefix ? $props.type : ""),
|
||||||
|
f: common_vendor.o((...args) => $options._onClick && $options._onClick(...args))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/项目2023/视力表/vision-record/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
|
||||||
|
wx.createComponent(Component);
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<text style="{{'color:' + a + ';' + ('font-size:' + b)}}" class="{{['uni-icons', c, d, e]}}" bindtap="{{f}}"></text>
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {
|
||||||
|
"uni-transition": "../../../uni-transition/components/uni-transition/uni-transition"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<view wx:if="{{a}}" class="{{['uni-popup', k, l]}}"><view bindtouchstart="{{j}}"><uni-transition wx:if="{{b}}" key="1" bindclick="{{c}}" u-i="70678190-0" bind:__l="__l" u-p="{{d}}"/><uni-transition wx:if="{{i}}" u-s="{{['d']}}" key="2" bindclick="{{h}}" u-i="70678190-1" bind:__l="__l" u-p="{{i}}"><view style="{{'background-color:' + e}}" class="{{['uni-popup__wrapper', f]}}" bindtap="{{g}}"><slot/></view></uni-transition></view></view>
|
@ -0,0 +1,115 @@
|
|||||||
|
"use strict";
|
||||||
|
const common_vendor = require("../../../../common/vendor.js");
|
||||||
|
class MPAnimation {
|
||||||
|
constructor(options, _this) {
|
||||||
|
this.options = options;
|
||||||
|
this.animation = common_vendor.index.createAnimation({
|
||||||
|
...options
|
||||||
|
});
|
||||||
|
this.currentStepAnimates = {};
|
||||||
|
this.next = 0;
|
||||||
|
this.$ = _this;
|
||||||
|
}
|
||||||
|
_nvuePushAnimates(type, args) {
|
||||||
|
let aniObj = this.currentStepAnimates[this.next];
|
||||||
|
let styles = {};
|
||||||
|
if (!aniObj) {
|
||||||
|
styles = {
|
||||||
|
styles: {},
|
||||||
|
config: {}
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
styles = aniObj;
|
||||||
|
}
|
||||||
|
if (animateTypes1.includes(type)) {
|
||||||
|
if (!styles.styles.transform) {
|
||||||
|
styles.styles.transform = "";
|
||||||
|
}
|
||||||
|
let unit = "";
|
||||||
|
if (type === "rotate") {
|
||||||
|
unit = "deg";
|
||||||
|
}
|
||||||
|
styles.styles.transform += `${type}(${args + unit}) `;
|
||||||
|
} else {
|
||||||
|
styles.styles[type] = `${args}`;
|
||||||
|
}
|
||||||
|
this.currentStepAnimates[this.next] = styles;
|
||||||
|
}
|
||||||
|
_animateRun(styles = {}, config = {}) {
|
||||||
|
let ref = this.$.$refs["ani"].ref;
|
||||||
|
if (!ref)
|
||||||
|
return;
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
nvueAnimation.transition(ref, {
|
||||||
|
styles,
|
||||||
|
...config
|
||||||
|
}, (res) => {
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
_nvueNextAnimate(animates, step = 0, fn) {
|
||||||
|
let obj = animates[step];
|
||||||
|
if (obj) {
|
||||||
|
let {
|
||||||
|
styles,
|
||||||
|
config
|
||||||
|
} = obj;
|
||||||
|
this._animateRun(styles, config).then(() => {
|
||||||
|
step += 1;
|
||||||
|
this._nvueNextAnimate(animates, step, fn);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.currentStepAnimates = {};
|
||||||
|
typeof fn === "function" && fn();
|
||||||
|
this.isEnd = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
step(config = {}) {
|
||||||
|
this.animation.step(config);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
run(fn) {
|
||||||
|
this.$.animationData = this.animation.export();
|
||||||
|
this.$.timer = setTimeout(() => {
|
||||||
|
typeof fn === "function" && fn();
|
||||||
|
}, this.$.durationTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const animateTypes1 = [
|
||||||
|
"matrix",
|
||||||
|
"matrix3d",
|
||||||
|
"rotate",
|
||||||
|
"rotate3d",
|
||||||
|
"rotateX",
|
||||||
|
"rotateY",
|
||||||
|
"rotateZ",
|
||||||
|
"scale",
|
||||||
|
"scale3d",
|
||||||
|
"scaleX",
|
||||||
|
"scaleY",
|
||||||
|
"scaleZ",
|
||||||
|
"skew",
|
||||||
|
"skewX",
|
||||||
|
"skewY",
|
||||||
|
"translate",
|
||||||
|
"translate3d",
|
||||||
|
"translateX",
|
||||||
|
"translateY",
|
||||||
|
"translateZ"
|
||||||
|
];
|
||||||
|
const animateTypes2 = ["opacity", "backgroundColor"];
|
||||||
|
const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"];
|
||||||
|
animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
|
||||||
|
MPAnimation.prototype[type] = function(...args) {
|
||||||
|
this.animation[type](...args);
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
function createAnimation(option, _this) {
|
||||||
|
if (!_this)
|
||||||
|
return;
|
||||||
|
clearTimeout(_this.timer);
|
||||||
|
return new MPAnimation(option, _this);
|
||||||
|
}
|
||||||
|
exports.createAnimation = createAnimation;
|
@ -0,0 +1,265 @@
|
|||||||
|
"use strict";
|
||||||
|
const uni_modules_uniTransition_components_uniTransition_createAnimation = require("./createAnimation.js");
|
||||||
|
const common_vendor = require("../../../../common/vendor.js");
|
||||||
|
const _sfc_main = {
|
||||||
|
name: "uniTransition",
|
||||||
|
emits: ["click", "change"],
|
||||||
|
props: {
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
modeClass: {
|
||||||
|
type: [Array, String],
|
||||||
|
default() {
|
||||||
|
return "fade";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
duration: {
|
||||||
|
type: Number,
|
||||||
|
default: 300
|
||||||
|
},
|
||||||
|
styles: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
customClass: {
|
||||||
|
type: String,
|
||||||
|
default: ""
|
||||||
|
},
|
||||||
|
onceRender: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
transform: "",
|
||||||
|
opacity: 1,
|
||||||
|
animationData: {},
|
||||||
|
durationTime: 300,
|
||||||
|
config: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
show: {
|
||||||
|
handler(newVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.open();
|
||||||
|
} else {
|
||||||
|
if (this.isShow) {
|
||||||
|
this.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 生成样式数据
|
||||||
|
stylesObject() {
|
||||||
|
let styles = {
|
||||||
|
...this.styles,
|
||||||
|
"transition-duration": this.duration / 1e3 + "s"
|
||||||
|
};
|
||||||
|
let transform = "";
|
||||||
|
for (let i in styles) {
|
||||||
|
let line = this.toLine(i);
|
||||||
|
transform += line + ":" + styles[i] + ";";
|
||||||
|
}
|
||||||
|
return transform;
|
||||||
|
},
|
||||||
|
// 初始化动画条件
|
||||||
|
transformStyles() {
|
||||||
|
return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.config = {
|
||||||
|
duration: this.duration,
|
||||||
|
timingFunction: "ease",
|
||||||
|
transformOrigin: "50% 50%",
|
||||||
|
delay: 0
|
||||||
|
};
|
||||||
|
this.durationTime = this.duration;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* ref 触发 初始化动画
|
||||||
|
*/
|
||||||
|
init(obj = {}) {
|
||||||
|
if (obj.duration) {
|
||||||
|
this.durationTime = obj.duration;
|
||||||
|
}
|
||||||
|
this.animation = uni_modules_uniTransition_components_uniTransition_createAnimation.createAnimation(Object.assign(this.config, obj), this);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 点击组件触发回调
|
||||||
|
*/
|
||||||
|
onClick() {
|
||||||
|
this.$emit("click", {
|
||||||
|
detail: this.isShow
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* ref 触发 动画分组
|
||||||
|
* @param {Object} obj
|
||||||
|
*/
|
||||||
|
step(obj, config = {}) {
|
||||||
|
if (!this.animation)
|
||||||
|
return;
|
||||||
|
for (let i in obj) {
|
||||||
|
try {
|
||||||
|
if (typeof obj[i] === "object") {
|
||||||
|
this.animation[i](...obj[i]);
|
||||||
|
} else {
|
||||||
|
this.animation[i](obj[i]);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`方法 ${i} 不存在`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.animation.step(config);
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* ref 触发 执行动画
|
||||||
|
*/
|
||||||
|
run(fn) {
|
||||||
|
if (!this.animation)
|
||||||
|
return;
|
||||||
|
this.animation.run(fn);
|
||||||
|
},
|
||||||
|
// 开始过度动画
|
||||||
|
open() {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
this.transform = "";
|
||||||
|
this.isShow = true;
|
||||||
|
let { opacity, transform } = this.styleInit(false);
|
||||||
|
if (typeof opacity !== "undefined") {
|
||||||
|
this.opacity = opacity;
|
||||||
|
}
|
||||||
|
this.transform = transform;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.timer = setTimeout(() => {
|
||||||
|
this.animation = uni_modules_uniTransition_components_uniTransition_createAnimation.createAnimation(this.config, this);
|
||||||
|
this.tranfromInit(false).step();
|
||||||
|
this.animation.run();
|
||||||
|
this.$emit("change", {
|
||||||
|
detail: this.isShow
|
||||||
|
});
|
||||||
|
}, 20);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 关闭过度动画
|
||||||
|
close(type) {
|
||||||
|
if (!this.animation)
|
||||||
|
return;
|
||||||
|
this.tranfromInit(true).step().run(() => {
|
||||||
|
this.isShow = false;
|
||||||
|
this.animationData = null;
|
||||||
|
this.animation = null;
|
||||||
|
let { opacity, transform } = this.styleInit(false);
|
||||||
|
this.opacity = opacity || 1;
|
||||||
|
this.transform = transform;
|
||||||
|
this.$emit("change", {
|
||||||
|
detail: this.isShow
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 处理动画开始前的默认样式
|
||||||
|
styleInit(type) {
|
||||||
|
let styles = {
|
||||||
|
transform: ""
|
||||||
|
};
|
||||||
|
let buildStyle = (type2, mode) => {
|
||||||
|
if (mode === "fade") {
|
||||||
|
styles.opacity = this.animationType(type2)[mode];
|
||||||
|
} else {
|
||||||
|
styles.transform += this.animationType(type2)[mode] + " ";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (typeof this.modeClass === "string") {
|
||||||
|
buildStyle(type, this.modeClass);
|
||||||
|
} else {
|
||||||
|
this.modeClass.forEach((mode) => {
|
||||||
|
buildStyle(type, mode);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return styles;
|
||||||
|
},
|
||||||
|
// 处理内置组合动画
|
||||||
|
tranfromInit(type) {
|
||||||
|
let buildTranfrom = (type2, mode) => {
|
||||||
|
let aniNum = null;
|
||||||
|
if (mode === "fade") {
|
||||||
|
aniNum = type2 ? 0 : 1;
|
||||||
|
} else {
|
||||||
|
aniNum = type2 ? "-100%" : "0";
|
||||||
|
if (mode === "zoom-in") {
|
||||||
|
aniNum = type2 ? 0.8 : 1;
|
||||||
|
}
|
||||||
|
if (mode === "zoom-out") {
|
||||||
|
aniNum = type2 ? 1.2 : 1;
|
||||||
|
}
|
||||||
|
if (mode === "slide-right") {
|
||||||
|
aniNum = type2 ? "100%" : "0";
|
||||||
|
}
|
||||||
|
if (mode === "slide-bottom") {
|
||||||
|
aniNum = type2 ? "100%" : "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.animation[this.animationMode()[mode]](aniNum);
|
||||||
|
};
|
||||||
|
if (typeof this.modeClass === "string") {
|
||||||
|
buildTranfrom(type, this.modeClass);
|
||||||
|
} else {
|
||||||
|
this.modeClass.forEach((mode) => {
|
||||||
|
buildTranfrom(type, mode);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return this.animation;
|
||||||
|
},
|
||||||
|
animationType(type) {
|
||||||
|
return {
|
||||||
|
fade: type ? 1 : 0,
|
||||||
|
"slide-top": `translateY(${type ? "0" : "-100%"})`,
|
||||||
|
"slide-right": `translateX(${type ? "0" : "100%"})`,
|
||||||
|
"slide-bottom": `translateY(${type ? "0" : "100%"})`,
|
||||||
|
"slide-left": `translateX(${type ? "0" : "-100%"})`,
|
||||||
|
"zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
|
||||||
|
"zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 内置动画类型与实际动画对应字典
|
||||||
|
animationMode() {
|
||||||
|
return {
|
||||||
|
fade: "opacity",
|
||||||
|
"slide-top": "translateY",
|
||||||
|
"slide-right": "translateX",
|
||||||
|
"slide-bottom": "translateY",
|
||||||
|
"slide-left": "translateX",
|
||||||
|
"zoom-in": "scale",
|
||||||
|
"zoom-out": "scale"
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 驼峰转中横线
|
||||||
|
toLine(name) {
|
||||||
|
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
|
return {
|
||||||
|
a: $data.isShow,
|
||||||
|
b: $data.animationData,
|
||||||
|
c: common_vendor.n($props.customClass),
|
||||||
|
d: common_vendor.s($options.transformStyles),
|
||||||
|
e: common_vendor.o((...args) => $options.onClick && $options.onClick(...args))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:/项目2023/视力表/vision-record/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
|
||||||
|
wx.createComponent(Component);
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"component": true,
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<view hidden="{{!a}}" ref="ani" animation="{{b}}" class="{{c}}" style="{{d}}" bindtap="{{e}}"><slot></slot></view>
|