Переглянути джерело

后台设置主页访问密码

liyangzhi 5 роки тому
батько
коміт
041a652484
2 змінених файлів з 91 додано та 0 видалено
  1. 4 0
      components/menu/data.js
  2. 87 0
      pages/main/index/user_homepwd.vue

+ 4 - 0
components/menu/data.js

@@ -165,6 +165,10 @@ export default [{
     {
       title: "会员直通车",
       path: baseUrl + "quick_manage"
+    },
+    {
+      title: "设置主页访问密码",
+      path: baseUrl + "user_homepwd"
     }
     ]
   },

+ 87 - 0
pages/main/index/user_homepwd.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="mainContainer">
+    <div class="mainTableTools">
+      <el-row>
+        <el-form :inline="true">
+          <el-form-item label="用户">
+            <el-input v-model="keyword" placeholder="uid/昵称/姓名"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="searchUser">查询</el-button>
+          </el-form-item>
+          <el-form-item>
+            <el-tag>当前设置总人数:<b>{{counter.total}}</b></el-tag>
+          </el-form-item>
+        </el-form>
+      </el-row>
+    </div>
+    <el-table :data="tableData" border style="width:600px">
+      <el-table-column label="用户">
+        <template slot-scope="scope">
+          <span class="lblue point">
+            <a target="_blank" :href="scope.row.host+'/rooter/user/'+scope.row.uid">{{scope.row.nickname}}({{scope.row.uid}})</a>
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="home_pwd" label="主页访问密码"></el-table-column>
+    </el-table>
+
+    <div class="mainPageBox">
+      <el-pagination
+        @current-change="changePagination"
+        :page-size="20"
+        :total="Number(total)"
+        layout="total, prev, pager, next"
+        background
+      ></el-pagination>
+    </div>
+
+  </div>
+</template>
+
+<script>
+
+  export default {
+    data() {
+      return {
+        page: 1,
+        total: 0,
+        tableData: [],
+        counter: {total: 0},
+        keyword: ''
+      }
+    },
+    computed: {
+      
+    },
+    mounted() {
+      this.getList();
+    },
+    methods: {
+      async getList() {
+        const data = {
+          page: this.page,
+          keyword: this.keyword
+        };
+        let res = await this.$post("/api/admin/UserSetting/getHomepwd", data);
+        if (res && res.status === 1) {
+          this.tableData = res.data.list;
+          this.total = res.data.total;
+          this.counter = res.data.counter;
+        }
+      },
+      changePagination(val) {
+        this.page = val;
+        this.getList();
+      },
+      searchUser() {
+        this.getList();
+      }
+
+    }
+  };
+</script>
+
+<style scoped>
+  
+</style>