zhaoyun 4 minggu lalu
induk
melakukan
ec1baf3c5e

+ 64 - 0
mer_plat_admin/src/api/secondHand.js

@@ -88,4 +88,68 @@ export function secondHandConfigUpdateApi(data) {
     method: 'post',
     data,
   });
+}
+
+/**
+ * 社区内容分页列表
+ * @param pram
+ */
+export function secondHandProdListApi(params) {
+  return request({
+    url: `/admin/platform/secondHand/prod/page/list`,
+    method: 'GET',
+    params,
+  });
+}
+/**
+ * 社区内容审核
+ * @param pram
+ */
+export function secondHandProdAuditApi(data) {
+  return request({
+    url: `/admin/platform/secondHand/prod/audit`,
+    method: 'post',
+    data,
+  });
+}
+/**
+ * 社区内容详情
+ * @param pram
+ */
+export function secondHandProdDetailApi(id) {
+  return request({
+    url: `/admin/platform/secondHand/prod/detail/${id}`,
+    method: 'GET',
+  });
+}
+/**
+ * 社区内容强制下架
+ * @param pram
+ */
+export function secondHandProdForcedDownApi(data) {
+  return request({
+    url: `/admin/platform/secondHand/prod/forced/down/${data.id}`,
+    method: 'POST',
+    data,
+  });
+}
+/**
+ * 社区内容删除
+ * @param pram
+ */
+export function secondHandProdDelApi(id) {
+  return request({
+    url: `/admin/platform/secondHand/prod/delete/${id}`,
+    method: 'post',
+  });
+}
+/**
+ * 社区笔记分类批量修改
+ */
+export function secondHandCategoryBatchApi(data) {
+  return request({
+    url: `/admin/platform/secondHand/prod/category/batch/update`,
+    method: 'POST',
+    data,
+  });
 }

+ 78 - 39
mer_plat_admin/src/views/marketing/secondHand/content/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="divBox">
     <el-card
-      v-hasPermi="['platform:community:note:page:list']"
+      v-hasPermi="['platform:secondHand:prod:page:list']"
       :bordered="false"
       shadow="never"
       class="ivu-mt"
@@ -44,7 +44,7 @@
           <el-form-item label="内容标题:" label-width="66px">
             <el-input v-model="title" @keyup.enter.native="getList(1)" placeholder="请输入内容标题" class="selWidth" />
           </el-form-item>
-          <el-form-item label="话题名称:" style="display: inline-block">
+          <!--el-form-item label="话题名称:" style="display: inline-block">
             <el-select
               @change="getList(1)"
               class="selWidth"
@@ -60,7 +60,7 @@
             >
               <el-option v-for="user in topicSelect" :key="user.id" :label="user.name" :value="user.id"> </el-option>
             </el-select>
-          </el-form-item>
+          </el-form-item-->
           <el-form-item label="图文类型:">
             <el-select
               v-model="tableFrom.type"
@@ -108,6 +108,11 @@
             <div>{{ scope.row.title | filterEmpty }}</div>
           </template>
         </el-table-column>
+		<el-table-column label="内容" min-width="160" :show-overflow-tooltip="true">
+		  <template slot-scope="scope">
+		    <div>{{ scope.row.content | filterEmpty }}</div>
+		  </template>
+		</el-table-column>
         <el-table-column label="内容作者" prop="authorName" min-width="140" />
         <el-table-column label="内容类型" min-width="70">
           <template slot-scope="scope">
@@ -121,25 +126,36 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="推荐级别" min-width="130">
+		<el-table-column label="价格" prop="price" min-width="100" />
+		<el-table-column label="所在城市" prop="city" min-width="100">
+			<template slot-scope="scope">
+			  <div>{{ scope.row.city | filterEmpty }}</div>
+			</template>
+		 </el-table-column>
+		 <el-table-column label="所在学校" prop="school" min-width="130">
+		 	<template slot-scope="scope">
+		 	  <div>{{ scope.row.school | filterEmpty }}</div>
+		 	</template>
+		  </el-table-column>
+        <!--el-table-column label="推荐级别" min-width="130">
           <template slot-scope="scope">
             <el-rate disabled v-model="scope.row.star"> </el-rate>
           </template>
-        </el-table-column>
-        <el-table-column prop="likeNum" label="点赞数" min-width="100" />
-        <el-table-column prop="replyNum" label="评论数" min-width="100" />
+        </el-table-column-->
+        <!--el-table-column prop="likeNum" label="点赞数" min-width="100" />
+        <el-table-column prop="replyNum" label="评论数" min-width="100" /-->
         <el-table-column prop="categoryName" label="分类" min-width="100" />
-        <el-table-column label="话题" min-width="130" :show-overflow-tooltip="true">
+        <!--el-table-column label="话题" min-width="130" :show-overflow-tooltip="true">
           <template slot-scope="scope">
             <div v-if="!scope.row.topicList">无</div>
             <div v-for="(item, i) in scope.row.topicList" :key="i">{{ item }}<br /></div>
           </template>
-        </el-table-column>
-        <el-table-column label="评论" min-width="90">
+        </el-table-column-->
+        <!--el-table-column label="评论" min-width="90">
           <template slot-scope="scope">
             <div>{{ scope.row.replyStatus | communityReplyStatusFilter }}</div>
           </template>
-        </el-table-column>
+        </el-table-column-->
         <el-table-column v-if="tabActive === '10'" label="审核状态" min-width="100">
           <template slot-scope="scope">
             <el-tag class="doingTag tag-background" v-if="scope.row.auditStatus === 0">待审核</el-tag>
@@ -172,11 +188,11 @@
               <a @click="onAudit(scope.row.id, true)">审核</a>
               <el-divider direction="vertical"></el-divider>
             </template>
-            <template v-if="checkPermi(['platform:community:note:repley:force:off:switch'])">
+            <!--template v-if="checkPermi(['platform:community:note:repley:force:off:switch'])">
               <a @click="onReplyOff(scope.row)">{{ scope.row.replyStatus !== 3 ? '关闭评论' : '取消关闭评论' }}</a>
               <el-divider direction="vertical"></el-divider>
-            </template>
-            <template v-if="scope.row.auditStatus == 1 && checkPermi(['platform:community:note:forced:down'])">
+            </template-->
+            <template v-if="scope.row.auditStatus == 1 && checkPermi(['platform:secondHand:prod:forced:down'])">
               <a @click="onOff(scope.row.id)">强制下架</a>
               <el-divider direction="vertical"></el-divider>
             </template>
@@ -185,22 +201,22 @@
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item
                   @click.native="onAudit(scope.row.id, false)"
-                  v-if="checkPermi(['platform:community:note:detail'])"
+                  v-if="checkPermi(['platform:secondHand:prod:detail'])"
                 >
                   详情
                 </el-dropdown-item>
                 <el-dropdown-item
                   @click.native="handleDelete(scope.row.id, scope.$index)"
-                  v-if="checkPermi(['platform:community:note:delete'])"
+                  v-if="checkPermi(['platform:secondHand:prod:delete'])"
                 >
                   删除
                 </el-dropdown-item>
-                <el-dropdown-item
+                <!--el-dropdown-item
                   @click.native="onEdit(scope.row)"
                   v-if="scope.row.auditStatus == 1 && checkPermi(['platform:community:note:star:update'])"
                 >
                   编辑星级
-                </el-dropdown-item>
+                </el-dropdown-item-->
               </el-dropdown-menu>
             </el-dropdown>
           </template>
@@ -298,6 +314,19 @@
                     {{ formValidate.createTime }}
                   </div>
                 </li>
+				<li class="item">
+				  <div class="tips">城市:</div>
+				  <div class="value">
+				    {{ formValidate.city}}
+				  </div>
+				</li>
+				<li class="item">
+				  <div class="tips">学校:</div>
+				  <div class="value">
+				    {{ formValidate.school }}
+				  </div>
+				</li>
+				
               </ul>
               <div class="list" style="display: block">
                 <div class="item">
@@ -306,6 +335,16 @@
                     {{ formValidate.content | filterEmpty }}
                   </div>
                 </div>
+				<div class="detailSection">
+				  <ul class="list mt-16">
+				    <li class="item">
+				      <div class="tips">价格:</div>
+				      <div class="value">
+				        {{ formValidate.price }}
+				      </div>
+				    </li>
+					</ul>
+				</div>
                 <div class="item row-middle">
                   <div class="tips">封面图:</div>
                   <div class="upLoadPicBox">
@@ -352,7 +391,7 @@
               </div>
             </div>
           </el-tab-pane>
-          <el-tab-pane label="关联商品" name="1">
+          <!--el-tab-pane label="关联商品" name="1">
             <el-table
               class="mt20"
               ref="tableList"
@@ -408,8 +447,8 @@
                   >
                 </template>
               </el-table-column>
-            </el-table>
-            <div class="block">
+            </el-table-->
+            <!--div class="block">
               <el-pagination
                 :page-sizes="[20, 40, 60, 80]"
                 :page-size="tableFromReply.limit"
@@ -419,7 +458,7 @@
                 @size-change="handleSizeChangeReply"
                 @current-change="pageChangeReply"
               />
-            </div>
+            </div-->
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -492,7 +531,7 @@
 // +----------------------------------------------------------------------
 // | Author: CRMEB Team <admin@crmeb.com>
 // +----------------------------------------------------------------------
-import * as community from '@/api/community';
+import * as secondHand from '@/api/secondHand';
 import { checkPermi } from '@/utils/permission';
 import { filterEmpty } from '@/filters';
 import { handleDeleteTable } from '@/libs/public'; // 权限判断函数
@@ -605,9 +644,9 @@ export default {
     };
   },
   mounted() {
-    if (checkPermi(['platform:community:note:page:list'])) this.getList(1);
+    if (checkPermi(['platform:secondHand:prod:page:list'])) this.getList(1);
     this.getCateSelect();
-    this.getTopicSelect();
+    //this.getTopicSelect();
   },
   methods: {
     filterEmpty,
@@ -633,8 +672,8 @@ export default {
     //审核提交
     onAuditSubmit() {
       this.auditStatusFrom.id = this.community_id;
-      community
-        .communityNoteAuditApi(this.auditStatusFrom)
+      secondHand
+        .secondHandProdAuditApi(this.auditStatusFrom)
         .then((res) => {
           this.$message.success('操作成功');
           this.dialogVisible = false;
@@ -692,8 +731,8 @@ export default {
     },
     // 分类列表;
     getCateSelect() {
-      community
-        .communityCategoryListApi({
+      secondHand
+        .secondHandCategoryListApi({
           limit: 100,
           page: 1,
         })
@@ -734,8 +773,8 @@ export default {
     //批量移动提交
     submitFormCategory() {
       if (this.categoryId === 0) return this.$message.warning('请选择要移动到的分类');
-      community
-        .communitycCategoryBatchApi({
+      secondHand
+        .secondHandCategoryBatchApi({
           categoryId: this.categoryId,
           noteIdList: this.noteIdList,
         })
@@ -825,8 +864,8 @@ export default {
       this.listLoading = true;
       this.tableFrom.page = num ? num : this.tableFrom.page;
       this.tableFrom.title = encodeURIComponent(this.title);
-      community
-        .communityNoteListApi(this.tableFrom)
+      secondHand
+        .secondHandProdListApi(this.tableFrom)
         .then((res) => {
           this.tableData.data = res.list;
           this.tableData.total = res.total;
@@ -880,11 +919,11 @@ export default {
     onAudit(id, bl) {
       this.loadingAudit = true;
       this.currentTab = 0;
-      this.getReplyNoteList(id);
+      //this.getReplyNoteList(id);
       this.community_id = id;
       this.dialogVisible = true;
       this.isExamine = bl;
-      community.communityNoteDetailApi(id).then((res) => {
+      secondHand.secondHandProdDetailApi(id).then((res) => {
         this.formValidate = res;
         this.loadingAudit = false;
       });
@@ -898,14 +937,14 @@ export default {
     },
     submit(id) {
       this.ruleForm.id = id;
-      community.communityNoteForcedDownApi(this.ruleForm).then((res) => {
+      secondHand.secondHandProdForcedDownApi(this.ruleForm).then((res) => {
         this.$message.success('下架成功');
         this.getList();
       });
     },
     onSubmit() {
-      community
-        .communityAuditApi(this.community_id, this.ruleForm)
+      secondHand
+        .secondHandProdAuditApi(this.community_id, this.ruleForm)
         .then((res) => {
           this.$message.success(res.message);
           this.dialogVisible = false;
@@ -931,7 +970,7 @@ export default {
     // 删除
     handleDelete(id) {
       this.$modalSure('删除该内容吗').then(() => {
-        community.communityNoteDelApi(id).then(() => {
+        secondHand.secondHandProdDelApi(id).then(() => {
           this.$message.success('删除成功');
           handleDeleteTable(this.tableData.data.length, this.tableFrom);
           this.getList();