Alex 4 éve
szülő
commit
59df0eeec9

+ 12 - 0
src/api/common/template.js

@@ -70,4 +70,16 @@ export function messageList(query) {
     method: 'get',
     params: query
   })
+}
+
+// 查询个人详情列表
+export function listProfiles(query) {
+  return request({
+    headers:  {
+      'isToken': false,
+    },
+    url: '/template/profileList',
+    method: 'get',
+    params: query
+  })
 }

+ 13 - 6
src/views/system/appUser/index.vue

@@ -91,7 +91,7 @@
               <span>{{ parseTime(scope.row.loginTime) }}</span>
             </template>
           </el-table-column>
-      <el-table-column label="操作" width="210">
+      <el-table-column label="操作" width="230">
         <template slot-scope="scope">
           <!-- <el-button
             size="mini"
@@ -134,6 +134,12 @@
             @click="myFamily(scope.row)"
             v-hasPermi="['system:appUser:query']"
           >家族</el-button>
+          <el-button
+            size="mini"
+            type="danger"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:appUser:edit']"
+          >修改</el-button>
           </el-row>
         </template>
       </el-table-column>
@@ -148,7 +154,7 @@
     />
 
     <!-- 添加或修改会员对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="750px" append-to-body :close-on-click-modal=false>
+    <el-dialog :title="title" v-if="open" :visible.sync="open" width="750px" append-to-body :close-on-click-modal=false>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-row :gutter="0" type="flex" justify="start">
           <el-col :span="8">
@@ -162,7 +168,6 @@
               <el-image 
                 style="width: 36px; height: 36px"
                 :src="codeImg" 
-                @load="getQrcodeImg"
                 :preview-src-list="[codeUrl]">
               </el-image>
             </el-form-item>
@@ -425,15 +430,16 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      debugger
       this.readonly = true;
       this.reset();
       const id = row.userId || this.ids;
       getUser(id).then(response => {
         this.form = response.data;
+        this.getQrcodeImg(id);
         this.open = true;
         this.title = "修改会员";
       });
-      this.getQrcodeImg(row);
     },
     /** 提交按钮 */
     submitForm() {
@@ -488,8 +494,9 @@ export default {
         }).catch(function() {});
     }
     ,
-    getQrcodeImg(row) {
-      const uid = row.id;
+    getQrcodeImg(id) {
+      debugger
+      const uid = id;
       const url = window.location.origin + this.templateRoute+'/' + uid + '?type=profile'
       const param = {url:url}
       getQrcode(param).then(res => {

+ 4 - 5
src/views/system/personalPage/index.vue

@@ -40,7 +40,7 @@
           v-hasPermi="['system:personal:page:add']"
         >新增</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="success"
           icon="el-icon-edit"
@@ -49,7 +49,7 @@
           @click="handleUpdate"
           v-hasPermi="['system:personal:page:edit']"
         >修改</el-button>
-      </el-col>
+      </el-col> -->
       <el-col :span="1.5">
         <el-button
           type="danger"
@@ -160,7 +160,6 @@
               <el-image 
                 style="width: 36px; height: 36px"
                 :src="codeImg" 
-                @load="getQrcodeImg"
                 :preview-src-list="[codeUrl]">
               </el-image>
             </el-form-item>
@@ -459,7 +458,7 @@ export default {
       const pid = row.id;
       const tid = row.templateId;
       // const route = this.templateList.find(item => item.id === tid).route;
-      const url = window.location.origin + this.templateRoute+'/' + pid + '?type=personal'
+      const url = window.location.origin + this.templateRoute+'/' + pid
       const param = {url:url}
       getQrcode(param).then(res => {
         this.codeUrl = "data:image/gif;base64," + res.img;
@@ -471,7 +470,7 @@ export default {
       const tid = this.form.templateId;
       // const route = this.templateList.find(item => item.id === tid).route;
       console.log(window.location.origin + this.templateRoute+'/' + pid)
-      var win = window.open(window.location.origin + this.templateRoute+'/' + pid + '?type=personal');
+      var win = window.open(window.location.origin + this.templateRoute+'/' + pid);
       win.document.title='个人页 - '+this.form.stakeholder
     },
     preview(row) {

+ 1 - 10
src/views/template/t.vue

@@ -120,24 +120,15 @@ export default {
     };
   },
   created() {
-    this.type = this.$route.query && this.$route.query.type;
     this.pid = this.$route.params && this.$route.params.id;
     this.personalImg.personalId = this.pid;
-
-    if(this.type == 'personal'){
-      this.getContent(this.pid);
-    }else {
-      this.getProfileContent(this.pid);
-    }
+    this.getContent(this.pid); 
     // 留言
     this.getModels(this.messageForm.type);
     this.getMessageList();
     this.messageForm.type = 1;
   },
   methods: {
-    getProfileContent(id){
-      this.content = ""
-    },
     getContent(id) {
       getPersonal(id).then((response) => {
         this.personal = response.data;