bding 1 anno fa
parent
commit
1b2fafbf7d

+ 4 - 0
config/modules/purchaser.js

@@ -56,4 +56,8 @@ export const purchaserApi = {
   yanxuanSpecialCancel: (params) => {
     return postHttp("/yanxuan_special/cancel", params);
   },
+   // 审批研选专栏
+   yanxuanSpecialEnable: (params) => {
+    return postHttp("/yanxuan_special/enable", params);
+  },
 };

+ 38 - 18
pages-purchaser/columnDetail/columnDetail.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="container column-detail">
-    <view :class="[scrollTopNumber == 0 ? 'top-content' : 'scroll-top-content']">
+    <view v-if="authorDetail.BgImg" :class="[scrollTopNumber == 0 ? 'top-content' : 'scroll-top-content']" :style="{ 'background-image': 'url(' + authorDetail.BgImg + ')' }">
       <view :class="['position-regular', scrollTopNumber != 0 && 'position-content-bg']">
         <view class="nav-bar-wrap" :style="{ height: navBarStyle.height, paddingTop: navBarStyle.paddingTop, paddingBottom: navBarStyle.paddingBottom }">
           <view class="content-box" :style="{ color: scrollTopNumber == 0 ? '#fff' : '#333' }">
@@ -13,37 +13,32 @@
         <view class="name-author">
           <view class="author-img">
             <view class="img-box">
-              <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/T2ddwIIaULVdkGM6gVMuNxBSft8Y.png"></image>
+              <image :src="authorDetail.HeadImg"></image>
             </view>
             <view class="set-btn"> + 关注</view>
           </view>
-          <view class="name-box">
-            <text>专栏名称专栏名称专栏名称</text>
-            <text>作者昵称作者昵称</text>
+          <view class="name-box" :style="{ color: scrollTopNumber == 0 ? '#fff' : '#333' }">
+            <text>{{ authorDetail.SpecialName }}</text>
+            <text>{{ authorDetail.NickName }}</text>
           </view>
         </view>
       </view>
       <view class="info-lable-card">
         <view class="info-card-lable">
-          <text>专栏名称专1</text>
-          <text>专栏名称专2</text>
-          <text>专栏名称专3</text>
-          <text>专栏名称专3</text>
-          <text>专栏名称专3</text>
-          <text>专栏名称专3</text>
+          <text v-for="item in dataProcessing(authorDetail.Label)" :key="item">{{ item }}</text>
         </view>
         <view class="info-card-fans">
-          <text>12</text>
+          <text>{{ authorDetail.SpecialArticleNum }}</text>
           <text>文章</text>
-          <text>24</text>
+          <text>{{ authorDetail.CollectNum }}</text>
           <text>被收藏</text>
-          <text>36</text>
+          <text>{{ authorDetail.FollowNum }}</text>
           <text>粉丝</text>
         </view>
       </view>
     </view>
     <view class="column-list-content">
-      <column-list-content />
+      <column-list-content :authorDetail="authorDetail" :mySpecialList="specialList" />
     </view>
   </view>
 </template>
@@ -51,6 +46,7 @@
 <script>
 import ColumnListContent from "../components/columnListContent.vue";
 import infoCard from "../components/infoCard.vue";
+import { purchaserApi } from "@/config/api";
 export default {
   components: { infoCard, ColumnListContent },
   data() {
@@ -61,6 +57,9 @@ export default {
         paddingBottom: "4px",
       },
       scrollTopNumber: 0,
+      authorDetail: {},
+      specialList: [],
+      detailUserId: 0,
     };
   },
   methods: {
@@ -72,12 +71,32 @@ export default {
         paddingBottom: "4px",
       };
     },
+    // 获取作者详情
+    async getAuthorDetail() {
+      const res = await purchaserApi.yanxuanSpecialAuthorDetail({ UserId: this.detailUserId });
+      if (res.Ret === 200) {
+        this.authorDetail = res.Data || {};
+        this.getColumnList();
+      }
+    },
+    // 获取专栏列表
+    async getColumnList() {
+      const res = await purchaserApi.yanxuanSpecialList({ UserId: this.authorDetail.UserId });
+      if (res.Ret === 200) {
+        this.specialList = res.Data.List || [];
+      }
+    },
+    // 数据处理
+    dataProcessing(item) {
+      return item ? item.split(",") : [];
+    },
   },
-  onLoad() {
+  onLoad(opacity) {
+    this.detailUserId = Number(opacity.id) || 53307;
     this.initNavBar();
+    this.getAuthorDetail();
   },
   onPageScroll(e) {
-    console.log(e);
     this.scrollTopNumber = e.scrollTop;
   },
 };
@@ -94,7 +113,7 @@ export default {
   .top-content {
     width: 100%;
     height: 625rpx;
-    background-image: url(https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png);
+
     background-size: 100% 100%;
     background-repeat: no-repeat;
   }
@@ -141,6 +160,7 @@ export default {
         }
       }
       .name-box {
+        color: #fff;
         margin-left: 20rpx;
         text:nth-child(1) {
           font-size: 36rpx;

+ 43 - 18
pages-purchaser/components/columnListContent.vue

@@ -9,33 +9,34 @@
 
       <view class="expan-btn" @click.stop="handleExpand" v-if="isShowBtn">{{ isExpand ? "收起" : "展开" }}</view>
     </view>
-    <view class="content-item">
-      <block v-for="item in mySpecialList" :key="item.Id">
+    <block v-if="mySpecialList && mySpecialList.length">
+      <view class="content-item" v-for="item in mySpecialList" :key="item.Id">
         <view class="type-time">
           <view class="type">{{ item.Type == 1 ? "笔 记" : "观 点" }} </view>
           <view class="time"> {{ item.PublishTime }}</view>
         </view>
         <view class="title-item"> {{ item.Title }}</view>
         <view class="text-conten">
-          {{ item.Content }}
+          <mp-html @ready="textContenReady($event, item)" class="text-conten-my" :content="richTextClamp(8) + item.Content + '</div>'" />
         </view>
-        <view class="look-all"> 查看全文 </view>
+        <view class="look-all" v-if="item.isShowBtn || item.ContentHasImg" @click="goDetail(item)"> 查看全文 </view>
         <view class="file-item"> 文档名称.docx </view>
         <view class="image-conten">
-          <image v-for="key in item.ImgUrl.split(',')" :key="key" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png" @click="previewImageMediahandler"></image>
+          <image v-for="key in dataProcessing(item.ImgUrl)" :key="key" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png" @click="previewImageMediahandler"></image>
         </view>
         <view class="lable-conten">
-          <text v-for="key in item.Tags.split(',')" :key="key">{{key}}</text>
+          <text v-for="key in dataProcessing(item.Tags)" :key="key">{{ key }}</text>
         </view>
         <view class="collect-conten">
           <image v-if="item.Status == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_icon.png"></image>
           <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image> 88
         </view>
-      </block>
-      <view class="introduce-detail-one" v-show="showText">
-        有专栏详情页面,情页面,暂时都不设置行业权限。专栏详情页未登录也可查看,收藏操作需先登录,内容详情页面也需要登录后才查容详情页面也需要登录后
+        <view class="introduce-detail-one" v-show="showText">
+          有专栏详情页面,情页面,暂时都不设置行业权限。专栏详情页未登录也可查看,收藏操作需先登录,内容详情页面也需要登录后才查容详情页面也需要登录后
+        </view>
       </view>
-    </view>
+    </block>
+
     <view v-show="loadTimeLine" class="loadTimeLine"></view>
   </view>
 </template>
@@ -61,13 +62,21 @@ export default {
       showText: true,
     };
   },
-  mounted() {
-    const queryOne = wx.createSelectorQuery().in(this).selectAll(".introduce-detail-one").boundingClientRect();
-    queryOne.exec((res) => {
-      this.richTextHeight = res[0][0].height;
-      this.showText = false;
-      this.getConentsHeight();
-    });
+  watch: {
+    mySpecialList: {
+      handler(newVal) {
+        if (newVal && newVal.length) {
+          const queryOne = wx.createSelectorQuery().in(this).selectAll(".introduce-detail-one").boundingClientRect();
+          queryOne.exec((res) => {
+            this.richTextHeight = res[0][0].height;
+            this.showText = false;
+            this.getConentsHeight();
+          });
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
   },
   methods: {
     previewImageMediahandler() {
@@ -83,7 +92,6 @@ export default {
       const query = wx.createSelectorQuery().in(this);
       query.selectAll(".introduce-detail").boundingClientRect();
       query.exec((res) => {
-        console.log(res[0][0].height);
         if (res[0][0].height > this.richTextHeight) {
           this.isExpand = false;
           this.isShowBtn = true;
@@ -96,6 +104,23 @@ export default {
         }, 300);
       });
     },
+    // 数据处理
+    dataProcessing(item) {
+      return item ? item.split(",") : [];
+    },
+    // 渲染文本的事件
+    textContenReady(e, item) {
+      let isShow = e.height >= 153 ? true : false;
+      this.$set(item, "isShowBtn", isShow);
+    },
+    //
+    richTextClamp(val) {
+      return `<div style="line-clamp: ${val};-webkit-line-clamp: ${val};text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-wrap: break-word;word-break: break-all;">`;
+    },
+    // 去往详情
+    goDetail(item) {
+      uni.navigateTo({ url: "/pages-purchaser/noteAndViewpoint/noteAndViewpoint?id=" + item.Id });
+    },
   },
 };
 </script>

+ 1 - 6
pages-purchaser/components/imageUpload.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="imageUploadContainer">
     <view class="imageUploadList">
-      <view class="imageItem" v-bind:key="index" v-for="(path, index) in imageList">
+      <view class="imageItem" v-bind:key="index" v-for="(path, index) in imageListData">
         <image
           :src="path"
           :class="{ dragging: isDragging(index) }"
@@ -323,11 +323,6 @@ export default {
 </script>
 
 <style>
-.imageUploadContainer {
-  /* padding: 10upx 5upx;
-		margin: 10upx 5upx; */
-}
-
 .dragging {
   transform: scale(1.2);
 }

+ 7 - 2
pages-purchaser/components/infoCard.vue

@@ -14,7 +14,7 @@
       </view>
     </view>
     <view class="info-card-lable">
-      <text v-for="item in authorDetail.Label.split(',')" :key="item">{{ item }}</text>
+      <text v-for="item in dataProcessing(authorDetail.Label)" :key="item">{{ item }}</text>
     </view>
     <view class="info-card-fans">
       <text>{{ authorDetail.SpecialArticleNum }}</text>
@@ -42,7 +42,12 @@ export default {
   data() {
     return {};
   },
-  methods: {},
+  methods: {
+    // 数据处理
+    dataProcessing(item) {
+      return item ? item.split(",") : [];
+    },
+  },
 };
 </script>
 

+ 12 - 4
pages-purchaser/contentAllPage/contentAllPage.vue

@@ -7,16 +7,16 @@
       </view>
     </view>
     <view class="content-ul">
-      <view class="content-li" v-for="item in specialCenter" :key="item.Id">
+      <view class="content-li" v-for="item in specialCenter" :key="item.Id" @click="toExamineHandler(item)">
         <view class="type-time">
           <view class="type"> {{ item.Type == 1 ? "笔 记" : "观 点" }} </view>
           <view class="time"> {{ item.PublishTime }}</view>
         </view>
         <view class="title-item"> {{ item.Title }}</view>
         <view class="btn-box">
-          <view class="cancell-box" v-if="tabActive == 3" @click="unpublishHandler(item)"> 取消发布</view>
-          <view class="reject-box" v-if="tabActive == 4" @click="rejectHandler(item)"> 驳回理由</view>
-          <view class="edit-box" v-if="tabActive != 2" @click="modifyHandler(item)"> 修改 </view>
+          <view class="cancell-box" v-if="tabActive == 3" @click.stop="unpublishHandler(item)"> 取消发布</view>
+          <view class="reject-box" v-if="tabActive == 4" @click.stop="rejectHandler(item)"> 驳回理由</view>
+          <view class="edit-box" v-if="tabActive != 2" @click.stop="modifyHandler(item)"> 修改 </view>
         </view>
       </view>
     </view>
@@ -95,6 +95,14 @@ export default {
         },
       });
     },
+    // 去往审核页面
+    toExamineHandler(item) {
+      if (item.Status == 2) {
+        uni.navigateTo({
+          url: "/pages-purchaser/toExamine/toExamine?id=" + item.Id,
+        });
+      }
+    },
   },
   onLoad() {
     this.getDataList();

+ 32 - 12
pages-purchaser/noteAndViewpoint/noteAndViewpoint.vue

@@ -5,38 +5,40 @@
         <view class="img-box">
           <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/T2ddwIIaULVdkGM6gVMuNxBSft8Y.png"></image>
         </view>
-        <text style="margin-left: 10rpx">作者昵称作者昵称</text>
+        <text style="margin-left: 10rpx">{{ detailDataForm.NickName }}</text>
       </view>
       <view class="type-time">
         <view class="type"> 笔 记</view>
-        <view class="time"> 2023.08.24 13:13:13</view>
+        <view class="time">{{ detailDataForm.NickName }}</view>
       </view>
-      <view class="title-item"> 标题标题标题标题标题标题标题标题标题标题标题标题</view>
+      <view class="title-item"> {{ detailDataForm.Title }}</view>
       <view class="text-conten">
-        有专栏详情页面,内容详情页面,暂时都不设置行业权限。专栏详情页未登录也可查看,收藏操作需先登录
-        内容详情页面也需要登录后才查看,登录也可查看,收藏操作需先登录,内容详情页面也需要登录后才查专栏介绍:有专栏详情页面,内容详情页面,暂时都不设置行业权限。专栏详情页未登录也可查看,收藏操作需先登录,
+        <mp-html :content="detailDataForm.Content" />
       </view>
       <view class="file-item"> 文档名称.docx </view>
       <view class="image-conten">
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png" @click="previewImageMediahandler"></image>
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png"></image>
+        <image v-for="key in dataProcessing(detailDataForm.ImgUrl)" :key="key" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png" @click="previewImageMediahandler"></image>
       </view>
       <view class="lable-conten">
-        <text>石头科技</text>
-        <text>公司调研电话会</text>
+        <text v-for="key in dataProcessing(detailDataForm.Tags)" :key="key">{{ key }}</text>
       </view>
       <view class="collect-conten">
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_icon.png"></image>
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image> 88
+        <image v-if="detailDataForm.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image>
+        <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_icon.png"></image>
+        {{ detailDataForm.CollectNum }}
       </view>
     </view>
   </view>
 </template>
 
 <script>
+import { purchaserApi } from "@/config/api";
 export default {
   data() {
-    return {};
+    return {
+      detailDataForm: "",
+      detailId: 0,
+    };
   },
   methods: {
     previewImageMediahandler() {
@@ -44,6 +46,24 @@ export default {
         urls: ["https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png"], //查看图片的数组
       });
     },
+    // 获取专栏详情
+    async getDetaliData() {
+      const res = await purchaserApi.yanxuanSpecialDetail({
+        Id: this.detailId,
+      });
+      if (res.Ret === 200) {
+        this.detailDataForm = res.Data;
+      }
+    },
+    // 数据处理
+    dataProcessing(item) {
+      return item ? item.split(",") : [];
+    },
+  },
+  onLoad(options) {
+    this.detailId = Number(options.id) || 0;
+    console.log(this.detailId);
+    this.detailId > 0 && this.getDetaliData();
   },
 };
 </script>

+ 8 - 6
pages-purchaser/specialColumn/specialColumn.vue

@@ -7,21 +7,19 @@
       </view>
     </view>
     <view class="item-ul" v-if="tabActive == 1">
-      <view class="item-li" v-for="item in specialList" :key="item.Id">
+      <view class="item-li" v-for="item in specialList" :key="item.Id" @click="goDetailPages(item)">
         <view class="item-title"> {{ item.Title }}</view>
         <view class="item-name-time">
           <view class="name"> {{ item.RealName }}</view>
           <view class="time"> {{ item.PublishTime.slice(0, 10) }}更新</view>
         </view>
-        <view class="item-content">
-          {{ item.Content }}
-        </view>
+        <view class="item-content"> 专栏介绍: {{ item.Introduction }} </view>
       </view>
     </view>
     <view class="set-up-info" v-if="tabActive == 2">
       <block v-if="authorDetail.NickName || authorDetail.SpecialName">
         <info-card :authorDetail="authorDetail" pagesType="专栏详情" />
-        <column-list-content :authorDetail="authorDetail" :mySpecialList="mySpecialList"/>
+        <column-list-content :authorDetail="authorDetail" :mySpecialList="mySpecialList" />
       </block>
       <block v-else>
         <view class="info-name info-box">
@@ -154,10 +152,14 @@ export default {
         });
         if (myRes.Ret === 200) {
           this.mySpecialList = res.Data.List || [];
-          console.log(myRes,'myRes');
+          console.log(myRes, "myRes");
         }
       }
     },
+    // 去往专栏详情
+    goDetailPages(item) {
+      uni.navigateTo({ url: "/pages-purchaser/columnDetail/columnDetail?id=" + item.Id });
+    },
   },
   onLoad() {
     this.getColumnList();

+ 60 - 27
pages-purchaser/toExamine/toExamine.vue

@@ -6,29 +6,22 @@
         <view class="img-box">
           <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/T2ddwIIaULVdkGM6gVMuNxBSft8Y.png"></image>
         </view>
-        <text style="margin-left: 10rpx">作者昵称作者昵称</text>
+        <text style="margin-left: 10rpx">{{ detailDataForm.NickName }}</text>
       </view>
       <view class="type-time">
         <view class="type"> 笔 记</view>
-        <view class="time"> 2023.08.24 13:13:13</view>
+        <view class="time">{{ detailDataForm.NickName }}</view>
       </view>
-      <view class="title-item"> 标题标题标题标题标题标题标题标题标题标题标题标题</view>
+      <view class="title-item"> {{ detailDataForm.Title }}</view>
       <view class="text-conten">
-        有专栏详情页面,内容详情页面,暂时都不设置行业权限。专栏详情页未登录也可查看,收藏操作需先登录
-        内容详情页面也需要登录后才查看,登录也可查看,收藏操作需先登录,内容详情页面也需要登录后才查专栏介绍:有专栏详情页面,内容详情页面,暂时都不设置行业权限。专栏详情页未登录也可查看,收藏操作需先登录,
+        {{ detailDataForm.Content }}
       </view>
       <view class="file-item"> 文档名称.docx </view>
       <view class="image-conten">
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png" @click="previewImageMediahandler"></image>
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png"></image>
+        <image v-for="key in detailDataForm.ImgUrl.split(',')" :key="key" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png" @click="previewImageMediahandler"></image>
       </view>
       <view class="lable-conten">
-        <text>石头科技</text>
-        <text>公司调研电话会</text>
-      </view>
-      <view class="collect-conten">
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_icon.png"></image>
-        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image> 88
+        <text v-for="key in detailDataForm.Tags.split(',')" :key="key">{{ key }}</text>
       </view>
     </view>
     <view class="bottom-btn">
@@ -56,11 +49,15 @@
 </template>
 
 <script>
+import { purchaserApi } from "@/config/api";
+
 export default {
   data() {
     return {
       rejectTextShow: false,
       rejectText: "",
+      detailDataForm: "",
+      detailId: 0,
     };
   },
   methods: {
@@ -69,21 +66,57 @@ export default {
         urls: ["https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Maskgroupbg.png"], //查看图片的数组
       });
     },
-	passRhrouhg(){
-		 uni.showModal({
-          title: "提醒",
-          content: "确定通过此内容在小程序展示吗?",
-          confirmColor: "#3385FF",
-          cancelColor: "#606266",
-          success(res) {
-            if (res.confirm) {
-              console.log(22);
-            } else {
-              console.log(11);
+    passRhrouhg() {
+      uni.showModal({
+        title: "提醒",
+        content: "确定通过此内容在小程序展示吗?",
+        confirmColor: "#3385FF",
+        cancelColor: "#606266",
+        success: async (res) => {
+          if (res.confirm) {
+            const res = await purchaserApi.yanxuanSpecialEnable({
+              Id: this.detailId,
+              Status: 1, //1通过2驳回
+            });
+            if (res.Ret === 200) {
+              this.$util.toast("审核通过");
+              uni.navigateBack();
             }
-          },
-        });
-	},
+          }
+        },
+      });
+    },
+    // 弹框关闭事件
+    cancelModal() {
+      this.rejectTextShow = false;
+      this.rejectText = "";
+    },
+    // 弹框确定事件
+    async confirmModal() {
+      const res = await purchaserApi.yanxuanSpecialEnable({
+        Id: this.detailId,
+        Status: 2, //1通过2驳回
+        Reason: this.rejectText,
+      });
+      if (res.Ret === 200) {
+        this.cancelModal();
+        uni.navigateBack();
+      }
+    },
+    // 获取专栏详情
+    async getDetaliData() {
+      const res = await purchaserApi.yanxuanSpecialDetail({
+        Id: this.detailId,
+      });
+      if (res.Ret === 200) {
+        this.detailDataForm = res.Data;
+      }
+    },
+  },
+  onLoad(options) {
+    this.detailId = Number(options.id) || 0;
+    console.log(this.detailId);
+    this.detailId > 0 && this.getDetaliData();
   },
 };
 </script>

+ 17 - 13
pages-purchaser/writeNote/writeNote.vue

@@ -25,7 +25,7 @@
       </view>
     </view>
     <view class="write-note-img">
-      <robbyImageUpload ref="robbyImageUpload" class="image-add-upload" @delete="deleteImage" @add="addImage" :value="ImgUrl" :server-url="uploadUrl" :header="header" :limit="6" />
+      <robbyImageUpload ref="robbyImageUpload" class="image-add-upload" v-model="fileList" :server-url="uploadUrl" :header="header" :limit="6" />
     </view>
     <view class="write-note-button">
       <view class="draft" @click="draftBtnHandler"> 草稿箱</view>
@@ -157,6 +157,8 @@ export default {
           },
         });
         return;
+      } else if (Title && Tags) {
+        return;
       }
       if (this.articleTitle || this.advice_content || this.fileList > 0 || this.industryCompanyLable.length > 0) {
         uni.showModal({
@@ -241,10 +243,12 @@ export default {
               Tags: this.industryCompanyLable.join(","),
               ImgUrl: this.$refs.robbyImageUpload.imageList.join(","),
               DoType: 1,
-              Id: 0,
+              Id: this.detailId,
             });
-          } else {
-            console.log(11);
+            if (resSave.Ret === 200) {
+              this.$util.toast("已保存至草稿箱");
+              uni.navigateBack();
+            }
           }
         },
       });
@@ -265,13 +269,13 @@ export default {
               Tags: this.industryCompanyLable.join(","),
               ImgUrl: this.$refs.robbyImageUpload.imageList.join(","),
               DoType: 2,
-              Id: 0,
+              Id: this.detailId,
             });
-            if(resSave.Ret===200){
-              
+            if (resSave.Ret === 200) {
+              this.$util.toast("发布成功");
+
+              uni.navigateBack();
             }
-          } else {
-            console.log(11);
           }
         },
       });
@@ -315,11 +319,12 @@ export default {
         this.detailDataForm = res.Data;
         this.articleTitle = this.detailDataForm.Title;
         this.advice_content = this.detailDataForm.Content;
-        this.$nextTick(() => {
+
+        setTimeout(() => {
           this.editorCtx.insertText({
             text: this.detailDataForm.Content,
           });
-        });
+        }, 200);
         this.fileList = this.detailDataForm.ImgUrl ? this.detailDataForm.ImgUrl.split(",") : [];
         this.industryCompanyLable = this.detailDataForm.Tags.split(",");
       }
@@ -335,8 +340,7 @@ export default {
     },
   },
   onLoad(options) {
-    this.detailId = options.id || 0;
-    console.log(this.detailId);
+    this.detailId = Number(options.id) || 0;
     this.detailId > 0 && this.getDetaliData();
     this.initNavBar();
     this.getIndustryList();

+ 8 - 10
pages.json

@@ -536,17 +536,15 @@
             "enablePullDownRefresh": false,
             "navigationStyle": "custom"
           }
+        },
+        {
+          "path": "toExamine/toExamine",
+          "style": {
+            "navigationBarTitleText": "笔记详情",
+            "enablePullDownRefresh": false
+          }
         }
-          ,{
-                    "path" : "toExamine/toExamine",
-                    "style" :                                                                                    
-                {
-                    "navigationBarTitleText": "笔记详情",
-                    "enablePullDownRefresh": false
-                }
-                
-                }
-            ]
+      ]
     },
     {
       "root": "pages-message",

+ 324 - 326
pages/purchaser/purchaser.vue

@@ -2,73 +2,68 @@
   <view class="container resear-container">
     <view class="top-content-box">
       <search-bar @goSearch="goSearch" :searchTitle="searchPlaceholderList.SummarySearch" :width="70" />
-		</view>
-		<view class="resear-body">
-			<view class="resear-banner-box">
-				<view class="banner-box-left">
-					<swiper autoplay :interval="4000" circular indicator-dots
-					indicator-color="rgba(255, 255, 255, 0.43)" indicator-active-color="#ffffff">
-						<swiper-item v-for="item in bannerDataList" :key="item.IndexImg" 
-						@click="bannerSwiperHandler(item)" class="swiper-item">
-							<image :src="item.IndexImg"></image>
-						</swiper-item>
-					</swiper>
-				</view>
-				<view class="banner-box-right">
-					<image :src="researchBanner.IndexImg" @click="bannerSwiperHandler(null)"></image>
-				</view>
-			</view>
-			<view class="purchaser-content-box">
-				<view class="purchaser-content-box-head">
-					<view class="content-box-head-title">
-						<image src="https://hzstatic.hzinsights.com/cygx/icon/purchaser-report.png"></image>
-						<text>近期报告更新</text>
-					</view>
-					<view class="content-box-head-more" @click="toReportTotal">
-						<text>全部更新</text>
-						<image src="https://hzstatic.hzinsights.com/cygx/icon/right-arrow-circle.png"></image>
-					</view>
-				</view>
-				<view class="purchaser-content-box-body">
-					<view class="purchaser-content-box-row" v-for="item in recentReportList" :key="item.ArticleId">
-						<text class="purchaser-content-row-tag" :style="{padding:item.ArticleTypeName.length==2?'4rpx 28rpx':'4rpx 15rpx'}">
-							{{item.ArticleTypeName}}
-						</text>
-						<view class="purchaser-content-row-title" :style="{ marginLeft: item.Title.substr(0, 1) != '【' ? '14rpx' : 0 }"
-						@click="goDetail(item)">
-							{{item.Title}}
-							<text v-for="it in item.List" class="purchaser-content-row-object" :key="it.IndustrialManagementId"
-							@click.stop="themeDetails(it, '月度收藏榜')">#{{it.IndustryName}}</text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="purchaser-content-box">
-				<view class="purchaser-content-box-head">
-					<view class="content-box-head-title">
-						<image src="https://hzstatic.hzinsights.com/cygx/icon/purchaser.png"></image>
-						<text>研选活动</text>
-					</view>
-					<view class="content-box-head-more" @click="toActivityTotal">
-						<text>查看全部</text>
-						<image src="https://hzstatic.hzinsights.com/cygx/icon/right-arrow-circle.png"></image>
-					</view>
-				</view>
-				
-				<purchaserActivityList style="width: 682rpx;" ref="purchaserActivityListRef" >
-					<view class="no-data-box">
-						<view class="no-data">
-							<image src="https://hzstatic.hzinsights.com/cygx/icon/activity-no-data.png" ></image>
-							<text>暂无对应活动</text>
-						</view>
-						<view class="end-activity-text" @click="endActivity">已结束活动>></view>
-					</view>
-					<view class="end-activity-text" @click="endActivity" slot="finished">已结束活动>></view>
-				</purchaserActivityList>
+    </view>
+    <view class="resear-body">
+      <view class="resear-banner-box">
+        <view class="banner-box-left">
+          <swiper autoplay :interval="4000" circular indicator-dots indicator-color="rgba(255, 255, 255, 0.43)" indicator-active-color="#ffffff">
+            <swiper-item v-for="item in bannerDataList" :key="item.IndexImg" @click="bannerSwiperHandler(item)" class="swiper-item">
+              <image :src="item.IndexImg"></image>
+            </swiper-item>
+          </swiper>
+        </view>
+        <view class="banner-box-right">
+          <image :src="researchBanner.IndexImg" @click="bannerSwiperHandler(null)"></image>
+        </view>
+      </view>
+      <view class="purchaser-content-box">
+        <view class="purchaser-content-box-head">
+          <view class="content-box-head-title">
+            <image src="https://hzstatic.hzinsights.com/cygx/icon/purchaser-report.png"></image>
+            <text>近期报告更新</text>
+          </view>
+          <view class="content-box-head-more" @click="toReportTotal">
+            <text>全部更新</text>
+            <image src="https://hzstatic.hzinsights.com/cygx/icon/right-arrow-circle.png"></image>
+          </view>
+        </view>
+        <view class="purchaser-content-box-body">
+          <view class="purchaser-content-box-row" v-for="item in recentReportList" :key="item.ArticleId">
+            <text class="purchaser-content-row-tag" :style="{ padding: item.ArticleTypeName.length == 2 ? '4rpx 28rpx' : '4rpx 15rpx' }">
+              {{ item.ArticleTypeName }}
+            </text>
+            <view class="purchaser-content-row-title" :style="{ marginLeft: item.Title.substr(0, 1) != '【' ? '14rpx' : 0 }" @click="goDetail(item)">
+              {{ item.Title }}
+              <text v-for="it in item.List" class="purchaser-content-row-object" :key="it.IndustrialManagementId" @click.stop="themeDetails(it, '月度收藏榜')">#{{ it.IndustryName }}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="purchaser-content-box">
+        <view class="purchaser-content-box-head">
+          <view class="content-box-head-title">
+            <image src="https://hzstatic.hzinsights.com/cygx/icon/purchaser.png"></image>
+            <text>研选活动</text>
+          </view>
+          <view class="content-box-head-more" @click="toActivityTotal">
+            <text>查看全部</text>
+            <image src="https://hzstatic.hzinsights.com/cygx/icon/right-arrow-circle.png"></image>
+          </view>
+        </view>
 
-			</view>
-		</view>
-   <!-- <view class="notice-content" v-if="wholeShowListData.YanXuan_Explain">
+        <purchaserActivityList style="width: 682rpx" ref="purchaserActivityListRef">
+          <view class="no-data-box">
+            <view class="no-data">
+              <image src="https://hzstatic.hzinsights.com/cygx/icon/activity-no-data.png"></image>
+              <text>暂无对应活动</text>
+            </view>
+            <view class="end-activity-text" @click="endActivity">已结束活动>></view>
+          </view>
+          <view class="end-activity-text" @click="endActivity" slot="finished">已结束活动>></view>
+        </purchaserActivityList>
+      </view>
+    </view>
+    <!-- <view class="notice-content" v-if="wholeShowListData.YanXuan_Explain">
       <view class="notice">
         <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/placard_icon.png"></image>
         <view class="notice-bar">
@@ -84,92 +79,96 @@
 <script>
 import freeCharge from "@/components/freeCharge";
 import SearchBar from "@/components/search-bar/searchBar.vue";
-import purchaserActivityList from "@/components/activity/purchaserActivityList.vue"
-import {purchaserApi} from "@/config/modules/purchaser.js"
-import { Research , activity} from "@/config/api.js";
+import purchaserActivityList from "@/components/activity/purchaserActivityList.vue";
+import { purchaserApi } from "@/config/modules/purchaser.js";
+import { Research, activity } from "@/config/api.js";
 import { Throttle } from "@/config/util.js";
 
 export default {
-  components: { freeCharge, SearchBar ,purchaserActivityList},
+  components: { freeCharge, SearchBar, purchaserActivityList },
   data() {
     return {
-			//==============================
-			bannerDataList:[],
-			researchBanner:{},
-			recentReportList:[],
+      //==============================
+      bannerDataList: [],
+      researchBanner: {},
+      recentReportList: [],
     };
   },
   methods: {
-		getBannerData(){
-			//获取banner信息
-			purchaserApi.getPurchaserBanner().then(res=>{
-				console.log(res);
-				if (res.Ret === 200) {
-					this.researchBanner = res.Data.ListB[0] || {}
-					this.bannerDataList = res.Data.ListA || []
-				}
-			})
-		},
-			
-		async getRecentReportList(){
-			// 获取最近更新报告
-			const res = await Research.researchArticleNewList({
-			  PageSize: 5,
-			  CurrentIndex: 1,
-			  ArticleTypeIds: '',
-			});
-			if (res.Ret === 200) {
-			  this.recentReportList = res.Data.List || []
-			}
-		},
-		//去往文章详情页面
-		goDetail(item) {
-		  this.$store.commit("setRouterReport", "月度收藏榜");
-		  uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
-		},
-		//去往主题详情
-		themeDetails(item, source) {
-		  uni.navigateTo({ url: "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId + "&pageRouter=" + source });
-		},
-		// 跳转研选已结束活动
-		endActivity() {
-		  uni.navigateTo({
-		    url: "/pages-purchaser/finishedActivity/finishedActivity",
-		  });
-		},
-		// 宣传单跳转
-		bannerSwiperHandler(item){
-			if(!item){
-				// 榜单
-				uni.navigateTo({
-					url: "/pages-purchaser/researchList/researchList"
-				})
-				return 
-			}
-			uni.navigateTo({
-				url: "/"+item.Path
-			})
-		},
-		toReportTotal(){
-			uni.navigateTo({
-				url: "/pages-purchaser/lastestReport/lastestReport"
-			})
-		},
-		toActivityTotal(){
-			uni.navigateTo({
-				url: "/pages-purchaser/purchaserActivity/purchaserActivity"
-			})
-		},
+    getBannerData() {
+      //获取banner信息
+      purchaserApi.getPurchaserBanner().then((res) => {
+        console.log(res);
+        if (res.Ret === 200) {
+          this.researchBanner = res.Data.ListB[0] || {};
+          this.bannerDataList = res.Data.ListA || [];
+        }
+      });
+    },
+
+    async getRecentReportList() {
+      // 获取最近更新报告
+      const res = await Research.researchArticleNewList({
+        PageSize: 5,
+        CurrentIndex: 1,
+        ArticleTypeIds: "",
+      });
+      if (res.Ret === 200) {
+        this.recentReportList = res.Data.List || [];
+      }
+    },
+    //去往文章详情页面
+    goDetail(item) {
+      if (item.IsSpecial == 1) {
+        uni.navigateTo({ url: "/pages-purchaser/specialColumn/specialColumn" });
+        return;
+      }
+
+      this.$store.commit("setRouterReport", "月度收藏榜");
+      uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
+    },
+    //去往主题详情
+    themeDetails(item, source) {
+      uni.navigateTo({ url: "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId + "&pageRouter=" + source });
+    },
+    // 跳转研选已结束活动
+    endActivity() {
+      uni.navigateTo({
+        url: "/pages-purchaser/finishedActivity/finishedActivity",
+      });
+    },
+    // 宣传单跳转
+    bannerSwiperHandler(item) {
+      if (!item) {
+        // 榜单
+        uni.navigateTo({
+          url: "/pages-purchaser/researchList/researchList",
+        });
+        return;
+      }
+      uni.navigateTo({
+        url: "/" + item.Path,
+      });
+    },
+    toReportTotal() {
+      uni.navigateTo({
+        url: "/pages-purchaser/lastestReport/lastestReport",
+      });
+    },
+    toActivityTotal() {
+      uni.navigateTo({
+        url: "/pages-purchaser/purchaserActivity/purchaserActivity",
+      });
+    },
     /* 搜索 */
     async goSearch() {
       await this.$store.dispatch("checkHandle", "/pages-search/indedxSearch/indedxSearch?id=研选" + "&source=买方研选页面");
     },
-
   },
   onLoad() {
-		this.getBannerData()
-		this.getRecentReportList()
-		this.$refs.purchaserActivityListRef.reloadActivityList();
+    this.getBannerData();
+    this.getRecentReportList();
+    this.$refs.purchaserActivityListRef.reloadActivityList();
   },
   onShow() {
     this.$store.commit("setRouterReport", "买方研选");
@@ -186,191 +185,191 @@ export default {
       fail: (err) => {},
     };
   },
-	onReachBottom: Throttle(function () {
-	  if (this.$refs.purchaserActivityListRef.page_no >= this.$refs.purchaserActivityListRef.pages) return;
-	  this.$refs.purchaserActivityListRef.loadActivityMore();
-	}),
+  onReachBottom: Throttle(function () {
+    if (this.$refs.purchaserActivityListRef.page_no >= this.$refs.purchaserActivityListRef.pages) return;
+    this.$refs.purchaserActivityListRef.loadActivityMore();
+  }),
 };
 </script>
 <style lang="scss">
 .resear-container {
-  background-color:#F3F5F9;
-	.top-content-box {
-		position: sticky;
-		top: 0;
-		left: 0;
-		right: 0;
-		z-index: 999;
-		padding-left: 30rpx;
-		background-color: white;
-	}
-	.resear-body{
-		padding: 20rpx 34rpx;
-		box-sizing: border-box;
-		.resear-banner-box{
-			display: flex;
-			align-items: center;
-			margin-bottom: 20rpx;
-			.banner-box-left{
-				height: 110rpx;
-				width: 448rpx;
-				margin-right: 20rpx;
-				swiper{
-					height: 100%;
-					width: 100%;
-					image{
-						height: 100%;
-						width: 100%;
-						border-radius: 8rpx;
-					}
-				}
-			}
-			.banner-box-right{
-				image{
-					height: 110rpx;
-					width: 214rpx;
-					vertical-align: bottom;
-					border-radius: 8rpx;
-				}
-			}
-		}
-		.purchaser-content-box{
-			margin-bottom: 20rpx;
-			.purchaser-content-box-head{
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				padding:20rpx;
-				font-size: 28rpx;
-				font-weight: 400;
-				color: #3385FF;
-				.content-box-head-title{
-					display: flex;
-					align-items: center;
-					image{
-						height: 30rpx;
-						width: 30rpx;
-						margin-right: 10rpx;
-					}
-					text{
-						font-weight: bold;
-						color: #333333;
-						font-size: 32rpx;
-						line-height: 45rpx;
-					}
-				}
-				.content-box-head-more{
-					height: 36rpx;
-					min-width: 120rpx;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					border-radius: 36rpx;
-					background-color: #E5EFFF;
-					display: flex;
-					align-items: center;
-					text{
-						font-size: 20rpx;
-						line-height: 28rpx;
-						font-weight: 400;
-						color: #7990B1;
-						margin-right: 4rpx;
-					}
-					image{
-						height: 15rpx;
-						width: 15rpx;
-					}
-				}
-			}
-			.purchaser-content-box-body{
-				padding: 0 20rpx 20rpx;
-				background-color: white;
-				border-radius: 16rpx;
-				border-top: 10rpx solid #8FA4C4;
-				.purchaser-content-box-row{
-					padding: 30rpx 0;
-					border-bottom: solid 1px #DCDFE6;
-					display: flex;
-					align-items: flex-start;
-					&:last-child{
-						border-bottom: none;
-					}
-					.purchaser-content-row-tag{
-						white-space: nowrap;
-						// padding: 4rpx 15rpx;
-						width: 110rpx;
-						// min-width: 110rpx;
-						height: 36rpx;
-						color: white;
-						font-size: 20rpx;
-						line-height: 28rpx;
-						font-weight: bold;
-						border-radius: 38rpx;
-						color: #928563;
-						background-color: #F2E8CC;
-						text-align: justify;
-						text-justify: inter-ideograph; // IE兼容
-						text-align-last: justify;
-						margin-right:8px ;
-						&:after{
-							content: "";
-							width: 110px;
-							display: block;
-						}
-					}
-					.purchaser-content-row-title{
-						-webkit-line-clamp: 2;
-						text-overflow: ellipsis;
-						overflow: hidden;
-						display: -webkit-box;
-						-webkit-box-orient: vertical;
-						word-break: break-all;
-						font-size: 28rpx;
-						font-weight: bold;
-						color: #333333;
-						line-height: 46rpx;
-						.purchaser-content-row-object{
-							color: #3385FF;
-							display: inline-block;
-							margin-left: 8rpx;
-						}
-					}
-				}
-			}
-			.no-data-box{
-				width: 682rpx;
-				height: 710rpx;
-				border-radius: 16rpx;
-				background-color: white;
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				justify-content: center;
-				.no-data{
-					display: flex;
-					flex-direction: column;
-					align-items: center;
-					margin-bottom: 40rpx;
-					image{
-						width: 412rpx;
-						height: 380rpx;
-						margin-bottom: 40rpx;
-					}
-					text{
-						font-size: 24rpx;
-						line-height: 34rpx;
-						color: #999999;
-					}
-				}
-			}
-			.end-activity-text{
-				text-align: center;
-				font-size: 24rpx;
-				line-height: 34rpx;
-				color:#376CBB ;
-			}
-		}
-	}
+  background-color: #f3f5f9;
+  .top-content-box {
+    position: sticky;
+    top: 0;
+    left: 0;
+    right: 0;
+    z-index: 999;
+    padding-left: 30rpx;
+    background-color: white;
+  }
+  .resear-body {
+    padding: 20rpx 34rpx;
+    box-sizing: border-box;
+    .resear-banner-box {
+      display: flex;
+      align-items: center;
+      margin-bottom: 20rpx;
+      .banner-box-left {
+        height: 110rpx;
+        width: 448rpx;
+        margin-right: 20rpx;
+        swiper {
+          height: 100%;
+          width: 100%;
+          image {
+            height: 100%;
+            width: 100%;
+            border-radius: 8rpx;
+          }
+        }
+      }
+      .banner-box-right {
+        image {
+          height: 110rpx;
+          width: 214rpx;
+          vertical-align: bottom;
+          border-radius: 8rpx;
+        }
+      }
+    }
+    .purchaser-content-box {
+      margin-bottom: 20rpx;
+      .purchaser-content-box-head {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        padding: 20rpx;
+        font-size: 28rpx;
+        font-weight: 400;
+        color: #3385ff;
+        .content-box-head-title {
+          display: flex;
+          align-items: center;
+          image {
+            height: 30rpx;
+            width: 30rpx;
+            margin-right: 10rpx;
+          }
+          text {
+            font-weight: bold;
+            color: #333333;
+            font-size: 32rpx;
+            line-height: 45rpx;
+          }
+        }
+        .content-box-head-more {
+          height: 36rpx;
+          min-width: 120rpx;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          border-radius: 36rpx;
+          background-color: #e5efff;
+          display: flex;
+          align-items: center;
+          text {
+            font-size: 20rpx;
+            line-height: 28rpx;
+            font-weight: 400;
+            color: #7990b1;
+            margin-right: 4rpx;
+          }
+          image {
+            height: 15rpx;
+            width: 15rpx;
+          }
+        }
+      }
+      .purchaser-content-box-body {
+        padding: 0 20rpx 20rpx;
+        background-color: white;
+        border-radius: 16rpx;
+        border-top: 10rpx solid #8fa4c4;
+        .purchaser-content-box-row {
+          padding: 30rpx 0;
+          border-bottom: solid 1px #dcdfe6;
+          display: flex;
+          align-items: flex-start;
+          &:last-child {
+            border-bottom: none;
+          }
+          .purchaser-content-row-tag {
+            white-space: nowrap;
+            // padding: 4rpx 15rpx;
+            width: 110rpx;
+            // min-width: 110rpx;
+            height: 36rpx;
+            color: white;
+            font-size: 20rpx;
+            line-height: 28rpx;
+            font-weight: bold;
+            border-radius: 38rpx;
+            color: #928563;
+            background-color: #f2e8cc;
+            text-align: justify;
+            text-justify: inter-ideograph; // IE兼容
+            text-align-last: justify;
+            margin-right: 8px;
+            &:after {
+              content: "";
+              width: 110px;
+              display: block;
+            }
+          }
+          .purchaser-content-row-title {
+            -webkit-line-clamp: 2;
+            text-overflow: ellipsis;
+            overflow: hidden;
+            display: -webkit-box;
+            -webkit-box-orient: vertical;
+            word-break: break-all;
+            font-size: 28rpx;
+            font-weight: bold;
+            color: #333333;
+            line-height: 46rpx;
+            .purchaser-content-row-object {
+              color: #3385ff;
+              display: inline-block;
+              margin-left: 8rpx;
+            }
+          }
+        }
+      }
+      .no-data-box {
+        width: 682rpx;
+        height: 710rpx;
+        border-radius: 16rpx;
+        background-color: white;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        .no-data {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          margin-bottom: 40rpx;
+          image {
+            width: 412rpx;
+            height: 380rpx;
+            margin-bottom: 40rpx;
+          }
+          text {
+            font-size: 24rpx;
+            line-height: 34rpx;
+            color: #999999;
+          }
+        }
+      }
+      .end-activity-text {
+        text-align: center;
+        font-size: 24rpx;
+        line-height: 34rpx;
+        color: #376cbb;
+      }
+    }
+  }
   // .notice-content {
   //   position: sticky;
   //   left: 0;
@@ -401,11 +400,10 @@ export default {
 }
 </style>
 <style lang="scss">
-	wx-swiper .wx-swiper-dot {
-		width: 6rpx;
-		height: 6rpx;
-		border-radius: 6rpx;
-		margin-bottom: -16rpx;
-	}
-	
+wx-swiper .wx-swiper-dot {
+  width: 6rpx;
+  height: 6rpx;
+  border-radius: 6rpx;
+  margin-bottom: -16rpx;
+}
 </style>