|
@@ -46,6 +46,36 @@ export default {
|
|
|
isOnunread() {
|
|
|
return this.$route.query.onunread === 'true';
|
|
|
},
|
|
|
+ ysfConfigData() {
|
|
|
+ return [
|
|
|
+ { key: 'real_name', value: this.$auth.user.userName },
|
|
|
+ { key: 'mobile_phone', hidden: true, value: this.$auth.user.phone },
|
|
|
+ { key: 'email', value: this.$auth.user.email },
|
|
|
+ {
|
|
|
+ key: 'avatar',
|
|
|
+ label: '头像',
|
|
|
+ value:
|
|
|
+ this.$auth.user.headImgFileId &&
|
|
|
+ fileKeyToUrl(this.$auth.user.headImgFileId),
|
|
|
+ }, // 访客头像
|
|
|
+ {
|
|
|
+ index: 0,
|
|
|
+ key: 'account',
|
|
|
+ label: '账号',
|
|
|
+ value: this.$auth.user.phone,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ ysfConfig() {
|
|
|
+ return {
|
|
|
+ uid: String(this.$auth.user.id),
|
|
|
+ name: this.$auth.user.userName,
|
|
|
+ mobile: this.$auth.user.phone,
|
|
|
+ email: this.$auth.user.email,
|
|
|
+ data: JSON.stringify(this.ysfConfigData),
|
|
|
+ language: 'zh-cn',
|
|
|
+ };
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
@@ -59,29 +89,7 @@ export default {
|
|
|
|
|
|
await new Promise((resolve, reject) => {
|
|
|
ysf('config', {
|
|
|
- uid: String(this.$auth.user.id),
|
|
|
- name: this.$auth.user.userName,
|
|
|
- mobile: this.$auth.user.phone,
|
|
|
- email: this.$auth.user.email,
|
|
|
- data: JSON.stringify([
|
|
|
- { key: 'real_name', value: this.$auth.user.userName },
|
|
|
- { key: 'mobile_phone', hidden: true, value: this.$auth.user.phone },
|
|
|
- { key: 'email', value: this.$auth.user.email },
|
|
|
- {
|
|
|
- key: 'avatar',
|
|
|
- label: '头像',
|
|
|
- value:
|
|
|
- this.$auth.user.headImgFileId &&
|
|
|
- fileKeyToUrl(this.$auth.user.headImgFileId),
|
|
|
- }, // 访客头像
|
|
|
- {
|
|
|
- index: 0,
|
|
|
- key: 'account',
|
|
|
- label: '账号',
|
|
|
- value: this.$auth.user.phone,
|
|
|
- },
|
|
|
- ]),
|
|
|
- language: 'zh-cn',
|
|
|
+ ...this.ysfConfig,
|
|
|
success: resolve,
|
|
|
error: reject,
|
|
|
});
|