|
@@ -254,6 +254,7 @@ import { listFriends } from "@/api/system/friends";
|
|
|
import { listFamilyByUid } from "@/api/system/family";
|
|
|
import qrcodeImg from '@/assets/image/qrcode_img.jpg'
|
|
|
import { getQrcode } from "@/api/common";
|
|
|
+import { getPersonalByUid } from "@/api/system/personalPage";
|
|
|
|
|
|
export default {
|
|
|
name: "AppUser",
|
|
@@ -318,6 +319,8 @@ export default {
|
|
|
},
|
|
|
// 固定个人模板页
|
|
|
templateRoute: "/template/t",
|
|
|
+ // 默认页模板
|
|
|
+ defaultRoute: "/template/index",
|
|
|
codeImg: qrcodeImg,
|
|
|
codeUrl: "",
|
|
|
reFresh: 1,
|
|
@@ -497,7 +500,19 @@ export default {
|
|
|
getQrcodeImg(id) {
|
|
|
debugger
|
|
|
const uid = id;
|
|
|
- const url = window.location.origin + this.templateRoute+'/' + uid + '?type=profile'
|
|
|
+ var personal = {};
|
|
|
+ // 是否有个人生平数据
|
|
|
+ getPersonalByUid(uid).then(res => {
|
|
|
+ personal = res.data;
|
|
|
+ });
|
|
|
+ var url = null;
|
|
|
+
|
|
|
+ // 如果有则生成个人生平页,否则生成默认页
|
|
|
+ if(personal != null) {
|
|
|
+ url = window.location.origin + this.templateRoute+'/' + personal.id
|
|
|
+ }else {
|
|
|
+ url = window.location.origin + this.defaultRoute+'/' + uid
|
|
|
+ }
|
|
|
const param = {url:url}
|
|
|
getQrcode(param).then(res => {
|
|
|
this.codeUrl = "data:image/gif;base64," + res.img;
|