|
@@ -75,7 +75,6 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { toSvg } from 'jdenticon';
|
|
import { toSvg } from 'jdenticon';
|
|
|
import { phonePattern } from '../utils/variables';
|
|
import { phonePattern } from '../utils/variables';
|
|
|
-import { createIcon } from '@download/blockies';
|
|
|
|
|
import faker from 'faker';
|
|
import faker from 'faker';
|
|
|
faker.locale = 'zh_CN';
|
|
faker.locale = 'zh_CN';
|
|
|
console.log(faker);
|
|
console.log(faker);
|
|
@@ -197,21 +196,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
.catch(() => {});
|
|
.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>
|
|
</script>
|