Browse Source

Merge branch 'develop' of http://39.101.216.213/gogs/liuhuijin/lineage-vue into develop

xiaoshushu 4 năm trước cách đây
mục cha
commit
76dd9ec795

+ 8 - 0
src/api/system/personalPage.js

@@ -80,4 +80,12 @@ export function getQrcode(param) {
     method: 'get',
     params: param
   })
+}
+
+// 根据干系人id获取总数
+export function getPersonalByUid(userId) {
+  return request({
+    url: '/system/personal/page/getByUid/' + userId,
+    method: 'get'
+  })
 }

+ 19 - 2
src/views/system/appUser/index.vue

@@ -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;

+ 2 - 2
src/views/template/t.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div class="add-message" @click="handleOpen"> + </div>
+    <div class="add-message" @click="handleOpen"> 留言 </div>
 
     <el-form>
       
@@ -229,7 +229,7 @@ export default {
   -webkit-box-pack: center;
   -ms-flex-pack: center;
   justify-content: center;
-  font-size: 20px;
+  font-size: 12px;
   -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
   box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
   cursor: pointer;