Xin chào ${this.fullname},
`; - content += 'Tài khoản đăng nhập của bạn đã được khởi tạo và sẵn sàng sử dụng:
'; - content += `Username: ${this.username}
`; - content += `Password: ${this.password}
`; - content += `Đội ngũ Utopia.
`; - let info = { subject: 'Tài khoản đăng nhập Utopia', to: this.email, sender: 1, content: content }; - let rs = await this.$insertapi('sendemail', info); + let loginUrl = this.$mode === 'dev' ? 'https://dev.biz.utopia.com.vn/' : 'https://biz.utopia.com.vn/'; + await this.templateEmail(loginUrl); } } if (this.dealer) { let copy = this.$copy(this.row); copy.user = this.user.id; await this.$updaterow('dealer', copy, null, this.pagename); + let obj = { user: this.user.id, apps: 11 }; + await this.$insertapi('userapps', obj, undefined, false); + let loginUrl = this.$mode === 'dev' ? 'https://dev.dealer.utopia.com.vn/' : 'https://dealer.utopia.com.vn/'; + await this.templateEmail(loginUrl); } this.loading = false; this.$dialog('Tạo tài khoản thành công.', 'Thành công', 'Success', 10); this.$emit('close'); }, + async templateEmail(loginUrl) { + let content = ` +
+
|
+
{{ props.row.username }}
+{{ props.row?.user__username ? props.row.user__username : props.row.username }}
{{ isVietnamese ? props.row.type__name : props.row.type__en }}
@@ -19,15 +19,15 @@{{ props.row.fullname }}
+{{ props.row?.user__fullname ? props.row.user__fullname : props.row.fullname }}
{{ props.row.email }}
+{{ props.row?.user__email ? props.row.user__email : props.row.email }}