|
@@ -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",
|
|
@@ -316,8 +317,11 @@ export default {
|
|
|
pageSize: 10,
|
|
|
userId: null,
|
|
|
},
|
|
|
+ personal: null,
|
|
|
// 固定个人模板页
|
|
|
templateRoute: "/template/t",
|
|
|
+ // 默认页模板
|
|
|
+ defaultRoute: "/template/index",
|
|
|
codeImg: qrcodeImg,
|
|
|
codeUrl: "",
|
|
|
reFresh: 1,
|
|
@@ -436,7 +440,7 @@ export default {
|
|
|
const id = row.userId || this.ids;
|
|
|
getUser(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
- this.getQrcodeImg(id);
|
|
|
+ this.getPersonal(id);
|
|
|
this.open = true;
|
|
|
this.title = "修改会员";
|
|
|
});
|
|
@@ -492,12 +496,25 @@ export default {
|
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|
|
|
}).catch(function() {});
|
|
|
+ },
|
|
|
+ getPersonal(uid){
|
|
|
+ getPersonalByUid(uid).then(res => {
|
|
|
+ this.personal = res.data;
|
|
|
+ this.getQrcodeImg(uid);
|
|
|
+ });
|
|
|
}
|
|
|
,
|
|
|
getQrcodeImg(id) {
|
|
|
debugger
|
|
|
const uid = id;
|
|
|
- const url = window.location.origin + this.templateRoute+'/' + uid + '?type=profile'
|
|
|
+ // 是否有个人生平数据
|
|
|
+ var url = null;
|
|
|
+ // 如果有则生成个人生平页,否则生成默认页
|
|
|
+ if(this.personal != null) {
|
|
|
+ url = window.location.origin + this.templateRoute+'/' + this.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;
|