-
{{ $t('user.inviteFriends') }}
-
{{ $t('user.inviteFriendsTips') }}
+
-
-
-
![]()
-
{{ bannerTitle }}
-
-
-
-
-
-
-
{{ pageOpeniDesc }}
+
+
+
+
+
+ img
+
+
+
+ 拖动图片到这里 或 点击上传
+
+
+
![]()
+
+
+
+
+
+
+ 全部
+ 仅人脸
+ 仅车牌
+
+
+
+
+
+ 取消
+ 开始处理
+
+
- {{ $t('user.registrationAdress') }}{{ invitationLink + invitationCode
- }}
- {{ $t('user.recommender') }}{{ invitationCode }}
- {{ $t('user.copyRegistrationInvitationLink') }}
-
-
-
+
+
+
+
+
+
+
@@ -71,7 +92,8 @@
import Clipboard from 'clipboard';
import QRCode from 'qrcodejs2';
import { formatDate } from 'element-ui/lib/utils/date-util';
- import { getUserInvitationCode } from '~/apis/modules/userinvite';
+ import { imageTranform } from '~/apis/modules/tuomin';
+ import axios from 'axios';
export default {
data() {
@@ -92,93 +114,62 @@
pageSizes: [10],
total: 0,
},
+
+ dialogImageUrl: '',
+ dialogVisible: false,
+ disabled: false,
+ form:{},
+
+ ImageUrl:'',
+ radio:2,
+ file:''
};
},
components: {},
methods: {
- initCopy() {
- const clipboard = new Clipboard('.__copy_link_btn__', {
- text: () => {
- return `${this.pageOpeniDesc}\n${this.$t('user.registrationAdress')}${this.invitationLink + this.invitationCode}\n${this.$t('user.recommender')}${this.invitationCode}`;
- },
- });
- clipboard.on('success', (e) => {
- this.$message({
- type: 'success',
- message: this.$t('user.theSharedContentHasBeenCopiedToTheClipboard')
- });
- });
- clipboard.on('error', (e) => {
- this.$message({
- type: 'error',
- message: this.$t('user.copyError')
- });
- });
+
+ handleLicensePreview(file) {
+ console.log(file)
+ this.ImageUrl = URL.createObjectURL(file.raw);
+ this.file = file
},
- transRowData(item) {
- return {
- userName: item.Name,
- avatarSrc: item.Avatar,
- userLink: window.origin + '/' + item.Name,
- statusStr: item.IsActive ? this.$t('user.Activated') : this.$t('user.notActive'),
- statusColor: item.IsActive ? 'rgb(82, 196, 26)' : 'rgb(245, 34, 45)',
- regTime: formatDate(new Date(item.CreatedUnix * 1000), 'yyyy-MM-dd HH:mm:ss'),
- }
+ cancelUpload(){
+ this.ImageUrl = ''
},
- initData() {
- getUserInvitationCode({ page: this.pageInfo.curpage, pageSize: this.pageInfo.pageSize }).then(res => {
- res = res.data;
- if (res) {
- this.bannerImg = res.page_banner_img;
- this.bannerTitle = res.page_banner_title;
- this.pageLink = res.page_link;
- this.pageLinkDesc = res.page_link_desc;
- this.invitationCode = res.invitation_code;
- this.pageOpeniDesc = res.page_openi_desc;
- this.tableData = (res.invitation_users || []).map((item, index) => {
- return this.transRowData(item);
- });
- this.pageInfo.total = res.invitation_users_count;
- const qrCode = new QRCode("__qr-code__", {
- text: this.invitationLink + this.invitationCode,
- width: 120,
- height: 120,
- colorDark: '#000000',
- colorLight: '#ffffff',
- correctLevel: QRCode.CorrectLevel.H
- });
- }
+ startTranform(){
+ let fd = new FormData();
+ fd.append('file', this.file.raw);
+ console.log(fd.get("file"))
+ axios({
+ method:'POST',
+ url: '/extension/tuomin/upload',
+ header:{
+ 'Content-Type':"multipart/form-data",
+ 'Accept':"image/png"
+ },
+ params: { model: this.radio },
+ data:fd
+ }).then(res => {
+ console.log(res)
+
}).catch(err => {
console.log(err);
- });
- },
- getTableData() {
- const params = {
- page: this.pageInfo.curpage,
- pageSize: this.pageInfo.pageSize,
- };
- this.loading = true;
- getUserInvitationCode(params).then(res => {
- this.loading = false;
- res = res.data;
- const data = (res.invitation_users || []).map((item, index) => {
- return this.transRowData(item);
+ this.$message({
+ type: 'error',
+ message: this.$t('submittedFailed')
});
- this.tableData = data;
- this.pageInfo.total = res.invitation_users_count;
- }).catch(err => {
- console.log(err);
- this.loading = false;
- });
+ })
+
},
- currentChange(val) {
- this.pageInfo.curpage = val;
- this.getTableData();
+ beforeLicenseUpload(){
+ console.log("----------")
},
+
+
+
},
mounted() {
- this.initData();
- this.initCopy();
+
},
beforeDestroy() {
},
@@ -186,6 +177,70 @@