xiongzhu 2 lat temu
rodzic
commit
f83bafc8e7
2 zmienionych plików z 1 dodań i 17 usunięć
  1. 0 1
      src/main/vue/package.json
  2. 1 16
      src/main/vue/src/views/UserEdit.vue

+ 0 - 1
src/main/vue/package.json

@@ -9,7 +9,6 @@
     "build-theme": "npx et -o src/styles/element_theme"
   },
   "dependencies": {
-    "@download/blockies": "https://github.com/download13/blockies.git",
     "@fortawesome/fontawesome": "^1.1.8",
     "@fortawesome/fontawesome-free-solid": "^5.0.13",
     "@fortawesome/vue-fontawesome": "^0.1.7",

+ 1 - 16
src/main/vue/src/views/UserEdit.vue

@@ -75,7 +75,6 @@
 <script>
 import { toSvg } from 'jdenticon';
 import { phonePattern } from '../utils/variables';
-import { createIcon } from '@download/blockies';
 import faker from 'faker';
 faker.locale = 'zh_CN';
 console.log(faker);
@@ -197,21 +196,7 @@ export default {
                 })
                 .catch(() => {});
         },
-        gen() {
-            const icon = createIcon({
-                size: 10,
-                scale: 20
-            });
-            this.$http.post('/upload/base64', { base64: icon.toDataURL() }).then(res => {
-                this.formData.avatar = res;
-            });
-            const card = faker.helpers.createCard();
-            this.formData.username = card.username;
-            this.formData.nickname = card.name;
-            this.formData.phone = card.phone;
-            this.$message('ok');
-            console.log(card);
-        }
+        gen() {}
     }
 };
 </script>