Ver Fonte

fix(client):优化顶部导航栏

yizhiyang há 10 meses atrás
pai
commit
cf3c4978c0

+ 2 - 0
src/PageMine/about/index.vue

@@ -1,5 +1,7 @@
 <template>
   <view class="container">
+    <page-navbar bgColor="#fff" title="关于车旅程"></page-navbar>
+
     <view class="title">公司简介</view>
     <view class="item-box">
       <u--text size="13" :text="text"></u--text>

+ 1 - 0
src/PageMine/coupon/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="container">
+    <page-navbar bgColor="#fff" title="优惠券"></page-navbar>
     <view class="coupon-box">
       <view class="coupon-item">
         <view class="item-left">

+ 1 - 0
src/PageMine/favourite/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="container" @click="handlerClearPop">
+    <page-navbar bgColor="#fff" title="我的收藏"></page-navbar>
     <view class="collect-list">
       <u-tabs
         :list="listCollect"

+ 2 - 0
src/PageMine/goodsReserve/index.vue

@@ -1,5 +1,7 @@
 <template>
   <view class="container">
+    <page-navbar bgColor="#fff" title="我的预约"></page-navbar>
+
     <view class="appoint" :key="index" v-for="(item, index) of init_list">
       <view class="appoint-list">
         <view class="appoint-title">{{ item.simpleMerchantVO.name }}</view>

+ 98 - 103
src/PageMine/myTeam/index.vue

@@ -1,5 +1,7 @@
 <template>
   <view class="container">
+    <page-navbar bgColor="#fff" title="我的团队"></page-navbar>
+
     <view class="top-img-box">
       <image class="top-img" :src="avatar" />
       <view class="top-name"> {{ nickname }} </view>
@@ -43,68 +45,78 @@
 </template>
 
 <script>
-  import {
-    getMyTeam,
-    inviteBind
-  } from "@/api/client/mine.js"
-  import {
-    mapGetters
-  } from "vuex"
-  export default {
-    data() {
-      return {
-        queryParams: {
-          paging: '1,10'
-        },
-        teamPersonList: []
-      };
-    },
-    mounted() {
-      this.handlerInitList()
+import { getMyTeam, inviteBind } from '@/api/client/mine.js';
+import { mapGetters } from 'vuex';
+export default {
+  data() {
+    return {
+      queryParams: {
+        paging: '1,10',
+      },
+      teamPersonList: [],
+    };
+  },
+  mounted() {
+    this.handlerInitList();
+  },
+  computed: {
+    ...mapGetters(['userId', 'gender', 'avatar', 'nickname']),
+  },
+  methods: {
+    // 初始化我的团队列表
+    handlerInitList() {
+      getMyTeam(this.queryParams).then(res => {
+        let { records } = res.data;
+        this.teamPersonList = records;
+        console.log('Res', res);
+      });
     },
-    computed: {
-      ...mapGetters(['userId', 'gender', 'avatar', 'nickname'])
+    // 测试绑定
+    handlerBind() {
+      let params = {
+        userId: this.userId,
+        targetId: '1774462327015325697',
+        type: 1,
+      };
+      inviteBind(params).then(res => {
+        console.log('@@@@res', res);
+      });
     },
-    methods: {
-      // 初始化我的团队列表
-      handlerInitList() {
-        getMyTeam(this.queryParams).then(res => {
-          let {
-            records
-          } = res.data
-          this.teamPersonList = records
-          console.log("Res", res)
-        })
-      },
-      // 测试绑定
-      handlerBind() {
-        let params = {
-          userId: this.userId,
-          targetId: '1774462327015325697',
-          type: 1
-        }
-        inviteBind(params).then(res => {
-          console.log("@@@@res", res)
-        })
-      }
-    }
-  };
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  .container {
-    padding: 20rpx 10rpx 50rpx;
+.container {
+  padding: 20rpx 10rpx 50rpx;
 
-    .top-img-box {
-      text-align: center;
+  .top-img-box {
+    text-align: center;
 
-      .top-img {
-        width: 160rpx;
-        height: 160rpx;
-        border-radius: 100rpx;
-      }
+    .top-img {
+      width: 160rpx;
+      height: 160rpx;
+      border-radius: 100rpx;
+    }
 
-      .top-name {
+    .top-name {
+      color: #6b7280;
+      font-weight: bold;
+      font-size: 32rpx;
+      margin-top: 20rpx;
+    }
+  }
+
+  .group-item-box {
+    padding: 0 20rpx;
+    margin-top: 60rpx;
+
+    .item-top {
+      display: flex;
+      justify-content: space-between;
+
+      .top-l,
+      .top-r {
         color: #6b7280;
         font-weight: bold;
         font-size: 32rpx;
@@ -112,60 +124,43 @@
       }
     }
 
-    .group-item-box {
-      padding: 0 20rpx;
-      margin-top: 60rpx;
-
-      .item-top {
-        display: flex;
-        justify-content: space-between;
-
-        .top-l,
-        .top-r {
-          color: #6b7280;
-          font-weight: bold;
-          font-size: 32rpx;
-          margin-top: 20rpx;
-        }
+    .item-content {
+      display: flex;
+      width: 100%;
+
+      .person-item {
+        margin-right: 20rpx;
+        text-align: center;
+        width: 25%;
       }
 
-      .item-content {
-        display: flex;
+      .item-name {
+        font-size: 28rpx;
+        font-weight: bold;
+        color: #000;
         width: 100%;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        overflow: hidden;
+      }
+
+      .person-item:last-child {
+        margin: 0;
+      }
 
-        .person-item {
-          margin-right: 20rpx;
-          text-align: center;
-          width: 25%;
-        }
-
-        .item-name {
-          font-size: 28rpx;
-          font-weight: bold;
-          color: #000;
-		  width: 100%;
-		  text-overflow: ellipsis;
-		  white-space: nowrap;
-		  overflow: hidden;
-        }
-
-        .person-item:last-child {
-          margin: 0;
-        }
-
-        .item-img {
-          width: 160rpx;
-          height: 160rpx;
-          border-radius: 100rpx;
-          margin: 60rpx 20rpx 0 0;
-        }
-
-        .dynamic-img {
-          width: 100%;
-          height: 500rpx;
-          margin-top: 60rpx;
-        }
+      .item-img {
+        width: 160rpx;
+        height: 160rpx;
+        border-radius: 100rpx;
+        margin: 60rpx 20rpx 0 0;
+      }
+
+      .dynamic-img {
+        width: 100%;
+        height: 500rpx;
+        margin-top: 60rpx;
       }
     }
   }
+}
 </style>

+ 27 - 21
src/PageMine/serviceCenter/index.vue

@@ -1,6 +1,8 @@
 <template>
   <view class="container">
-<!--    <view class="title"> 常见问题 </view>
+    <page-navbar bgColor="#fff" title="帮助中心"></page-navbar>
+
+    <!--    <view class="title"> 常见问题 </view>
     <view class="item-box issue-box">
       <view class="item" :key="item" v-for="item of 4">
         <view class="item-l">
@@ -9,19 +11,23 @@
         <view class="item-r"> 如何注销账户? </view>
       </view>
     </view> -->
-    <view v-for='item of init_list' :key="item">
+    <view v-for="item of init_list" :key="item">
       <view class="title"> {{ item.name }} </view>
-      <view class="item-box hote-box" >
-        <view class="item" v-for='(itm,idx) of item.helpList' :key="idx" @click='handlerSkipDetail(itm)'>
+      <view class="item-box hote-box">
+        <view
+          class="item"
+          v-for="(itm, idx) of item.helpList"
+          :key="idx"
+          @click="handlerSkipDetail(itm)"
+        >
           <view class="item-l">
-            <img class="img" :src=" itm.icon ? itm.icon : require('@/static/logo.png')" alt="" />
+            <img class="img" :src="itm.icon ? itm.icon : require('@/static/logo.png')" alt="" />
           </view>
           <view class="item-r"> {{ itm.title }} </view>
         </view>
       </view>
     </view>
 
-
     <!-- <view class="title"> 在线客服 </view>
     <view class="cust-box">
       <view class="item" :key="item" v-for="item of 3">
@@ -52,7 +58,7 @@
 </template>
 
 <script>
-  import { getProbleList } from "@/api/client/mine.js"
+import { getProbleList } from '@/api/client/mine.js';
 export default {
   data() {
     return {
@@ -73,20 +79,20 @@ export default {
           text: '客服时间:周一至周五9:00-20:00',
         },
       ],
-      queryParams:{
-        paging:'1,10'
+      queryParams: {
+        paging: '1,10',
       },
-      init_list:[]
+      init_list: [],
     };
   },
-  mounted(){
-    this.handlerInitList()
+  mounted() {
+    this.handlerInitList();
   },
   methods: {
-    handlerInitList(){
-      getProbleList(this.queryParams).then(res=>{
-        this.init_list = res.data
-      })
+    handlerInitList() {
+      getProbleList(this.queryParams).then(res => {
+        this.init_list = res.data;
+      });
     },
     // 点击联系客服
     handlerCallService() {
@@ -103,12 +109,12 @@ export default {
       });
     },
     // 跳转到问题详情
-    handlerSkipDetail(itm){
-      console.log("@@@@itm",itm)
+    handlerSkipDetail(itm) {
+      console.log('@@@@itm', itm);
       uni.navigateTo({
-        url:`/PageMine/serviceCenter/serviceDetail?itm=${JSON.stringify(itm)}`
-      })
-    }
+        url: `/PageMine/serviceCenter/serviceDetail?itm=${JSON.stringify(itm)}`,
+      });
+    },
   },
 };
 </script>

+ 1 - 0
src/PageMine/shopCar/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="cart">
+    <page-navbar bgColor="#fff" title="购物车"></page-navbar>
     <view class="manage">
       <view @click="handlerManage">管理</view>
       <!-- <view>退出管理</view> -->

+ 28 - 22
src/pages.json

@@ -82,13 +82,13 @@
         {
           "path": "marketer/index",
           "style": {
-            "navigationBarTitleText": "商家详情"
+            "navigationStyle": "custom"
           }
         },
         {
           "path": "productDetail/index",
           "style": {
-            "navigationBarTitleText": "商品详情"
+            "navigationStyle": "custom"
           }
         },
         {
@@ -112,24 +112,30 @@
         {
           "path": "category/index",
           "style": {
-            "navigationBarTitleText": "商品类型"
+            "navigationStyle": "custom"
           }
         },
         {
           "path": "storeList/index",
           "style": {
-            "navigationBarTitleText": "商品列表"
+            "navigationStyle": "custom"
           }
         }
       ]
     },
     {
-      "root": "pagesCustomer",
+      "root": "pagesCommunity",
       "pages": [
         {
-          "path": "communityPostReview",
+          "path": "publishReview/index",
           "style": {
-            "navigationBarTitleText": "发布评论"
+            "navigationStyle": "custom"
+          }
+        },
+        {
+          "path": "dynamicDetail/index",
+          "style": {
+            "navigationBarTitleText": "动态详情"
           }
         }
       ]
@@ -138,27 +144,27 @@
       "root": "pagesMessage",
       "pages": [
         {
-          "path": "orderNotify",
+          "path": "orderNotify/index",
           "style": {
-            "navigationBarTitleText": "订单通知"
+            "navigationStyle": "custom"
           }
         },
         {
-          "path": "commentNotify",
+          "path": "commentNotify/index",
           "style": {
-            "navigationBarTitleText": "评论通知"
+            "navigationStyle": "custom"
           }
         },
         {
-          "path": "kudosNotify",
+          "path": "kudosNotify/index",
           "style": {
-            "navigationBarTitleText": "点赞通知"
+            "navigationStyle": "custom"
           }
         },
         {
-          "path": "benefitsNotify",
+          "path": "benefitsNotify/index",
           "style": {
-            "navigationBarTitleText": "优惠福利"
+            "navigationStyle": "custom"
           }
         }
       ]
@@ -200,37 +206,37 @@
         {
           "path": "favourite/index",
           "style": {
-            "navigationBarTitleText": "收藏列表"
+            "navigationStyle": "custom"
           }
         },
         {
           "path": "shopCar/index",
           "style": {
-            "navigationBarTitleText": "购物车"
+            "navigationStyle": "custom"
           }
         },
         {
           "path": "coupon/index",
           "style": {
-            "navigationBarTitleText": "优惠券列表"
+            "navigationStyle": "custom"
           }
         },
         {
           "path": "goodsReserve/index",
           "style": {
-            "navigationBarTitleText": "我的预约"
+            "navigationStyle": "custom"
           }
         },
         {
           "path": "myTeam/index",
           "style": {
-            "navigationBarTitleText": "我的团队"
+            "navigationStyle": "custom"
           }
         },
         {
           "path": "serviceCenter/index",
           "style": {
-            "navigationBarTitleText": "客服中心"
+            "navigationStyle": "custom"
           }
         },
         {
@@ -248,7 +254,7 @@
         {
           "path": "about/index",
           "style": {
-            "navigationBarTitleText": "关于车旅程"
+            "navigationStyle": "custom"
           }
         },
         {

+ 355 - 0
src/pages/community/index copy.vue

@@ -0,0 +1,355 @@
+<template>
+  <view class="container">
+    <u-sticky bgColor="#F8F8F8">
+      <view class="top"> </view>
+      <u-tabs
+        :list="list1"
+        lineWidth="30"
+        lineColor="#f56c6c"
+        @change="tabChange"
+        :activeStyle="{
+          color: '#303133',
+          fontWeight: 'bold',
+          transform: 'scale(1.05)',
+          fontSize: '40rpx',
+          fontStyle: 'italic',
+        }"
+        :inactiveStyle="{
+          color: '#606266',
+          transform: 'scale(1)',
+        }"
+        itemStyle=" padding-left: 15px; padding-right: 15px; height: 34px;"
+      >
+      </u-tabs>
+      <view class="top-bottom"> </view>
+    </u-sticky>
+
+    <view class="center-box">
+      <view class="item-box" v-for="(item, index) of initList" :key="index">
+        <view class="item-top">
+          <view class="top-left">
+            <u-avatar :src="item.userDTO.avatar" size="45" />
+          </view>
+          <view class="top-right">
+            <view class="right-title">{{ item.userDTO.nickname }}</view>
+            <view class="right-address">
+              <view class="marRight-20"> {{ item.distanceTime }} </view>
+              <view class=""> {{ item.location }} </view>
+            </view>
+          </view>
+        </view>
+        <!-- <u-line margin='10rpx 0'></u-line> -->
+        <view class="item-center">
+          <view class="center-text"> {{ item.textContent }} </view>
+          <view class="center-img-box">
+            <image
+              v-for="itm of item.resourceVos"
+              :key="itm"
+              class="center-img"
+              :src="itm.resourceKey"
+              @click="reviewImg(itm)"
+            >
+            </image>
+          </view>
+        </view>
+        <view class="item-bottom">
+          <view class="bottom-item">
+            <u-icon
+              :name="item.clickStatus == 0 ? 'heart' : 'heart-fill'"
+              :size="iconSize"
+              @click="handlerPraise(item)"
+            ></u-icon>
+            <view class="iconNUm">{{ item.goodNum }}</view>
+          </view>
+          <view class="bottom-item" @click="handlerRequireComment(item)">
+            <u-icon name="more-circle" :size="iconSize"></u-icon>
+            <view class="iconNUm">{{ item.commentNum }}</view>
+          </view>
+        </view>
+        <u-line margin="-20rpx 0" v-if="index != initList.length - 1"></u-line>
+      </view>
+    </view>
+
+    <view class="flex-box">
+      <view class="flex" @click="handlerToPublish">
+        <view class="flex-icon">
+          <u-icon name="edit-pen" color="#fff" size="26"></u-icon>
+        </view>
+        <view class=""> 发布 </view>
+      </view>
+    </view>
+
+    <u-popup
+      :show="communityShow"
+      @close="communityShow = false"
+      mode="bottom"
+      overlayOpacity="0.1"
+      round="20"
+    >
+      <view class="pop-box">
+        <!-- <communityPop :dynamicId='dynamicId' :dynamicUserId='dynamicUserId' @uploadComment='uploadComment' /> -->
+      </view>
+    </u-popup>
+  </view>
+</template>
+
+<script>
+import { clientContentList, addEvaulateRecords } from '@/api/client/community.js';
+import communityPop from './communityPop.vue';
+import { GetDateToNewData } from '@/utils/tools.js';
+export default {
+  components: { communityPop },
+  data() {
+    return {
+      communityShow: false,
+      list1: [
+        {
+          name: '最新',
+          type: 'LATEST',
+        },
+        {
+          name: '关注',
+          type: 'ATTENTION',
+        },
+        {
+          name: '最热',
+          type: 'HOTTEST',
+        },
+      ],
+      iconSize: 24,
+      duration: 700,
+      params: {
+        pageNum: 1,
+        pageSize: 10,
+        type: 'LATEST',
+        keyWord: '',
+      },
+      initList: [], // 初始化列表
+      userId: '',
+      dynamicId: 0,
+      dynamicUserId: 0,
+      total: 0,
+    };
+  },
+  // 下拉刷新
+  onPullDownRefresh() {
+    this.params.pageNum = 1;
+    this.initList = [];
+    this.handlerInitList();
+    setTimeout(function () {
+      uni.stopPullDownRefresh();
+      this.uToast('刷新成功');
+    }, 1000);
+  },
+  // 触底刷新
+  onReachBottom() {
+    let { pageNum, pageSize } = this.params;
+    if (pageNum * pageSize > this.total) return this.uToast('没有更多啦');
+    this.params.pageNum++;
+    this.handlerInitList();
+  },
+  onShow() {
+    this.handlerInitList();
+  },
+  watch: {
+    communityShow(newValue) {
+      if (!newValue) {
+        this.dynamicId = null;
+        this.dynamicUserId = null;
+      }
+    },
+  },
+  mounted() {
+    this.userId = this.$store.state.user.userId;
+  },
+  methods: {
+    handlerInitList() {
+      clientContentList(this.params).then(res => {
+        res.data.records.map(rs => {
+          let time = GetDateToNewData(rs.createTime);
+          this.$set(rs, 'distanceTime', time);
+        });
+        this.total = res.data.total;
+        this.initList = [...this.initList, ...res.data.records];
+      });
+    },
+    // 切换顶部tabbar
+    tabChange(e) {
+      this.params.type = e.type;
+      this.params.pageNum = 1;
+      this.initList = [];
+      this.handlerInitList();
+    },
+    // 点击发布按钮
+    handlerToPublish() {
+      uni.navigateTo({
+        url: '/pagesCustomer/communityPostReview',
+      });
+    },
+    // 点赞按钮
+    handlerPraise(item) {
+      let params = {
+        dynamicStatusType: 'GOOD', // 操作类型:1-点赞;2-踩 允许值: GOOD, BAD
+        recordType: 'DYNAMIC', // 内容类型:1-动态;2-评论/回复 允许值: DYNAMIC, COMMENT, USER
+        actionType: item.clickStatus == 0 ? 'ADD' : 'CANCEL', // 点击类型:1-点赞/踩;2-取消赞/取消踩   允许值: ADD, CANCEL
+        contentId: item.id,
+        targetUserId: item.userId,
+      };
+      addEvaulateRecords(params).then(res => {
+        if (res.code === 'OK') {
+          uni.showToast({
+            title: '关注成功',
+            icon: 'none',
+          });
+          this.handlerInitList();
+        } else {
+          uni.showToast({
+            title: res.msg,
+            icon: 'none',
+          });
+          return;
+        }
+      });
+    },
+    // 查询动态评论
+    handlerRequireComment(item) {
+      this.dynamicId = item.id;
+      this.dynamicUserId = item.userId;
+      this.communityShow = true;
+    },
+    // 动态发布评论后 更新list
+    uploadComment() {
+      this.handlerInitList();
+    },
+    // 预览图片
+    reviewImg(itm) {
+      uni.previewImage({
+        urls: [itm.resourceKey],
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.container {
+  background-color: #f8f8f8;
+  min-height: calc(100vh);
+  .top {
+    height: 100rpx;
+  }
+
+  .top-bottom {
+    height: 20rpx;
+  }
+
+  .center-box {
+    font-size: 28rpx;
+    .item-box {
+      padding: 20rpx 20rpx 30rpx 20rpx;
+      background-color: #fff;
+
+      .item-top {
+        display: flex;
+        align-items: center;
+
+        .top-left {
+          .img {
+            width: 90rpx;
+            height: 90rpx;
+            border-radius: 50%;
+          }
+        }
+
+        .top-right {
+          margin-left: 20rpx;
+
+          .right-title {
+            font-weight: bold;
+            font-size: 34rpx;
+          }
+
+          .right-address {
+            display: flex;
+
+            .marRight-20 {
+              margin-right: 20rpx;
+            }
+
+            color: #959595;
+            // font-style: italic;
+            // font-weight: bold;
+            font-size: 24rpx;
+          }
+        }
+      }
+
+      .item-center {
+        margin-left: 100rpx;
+        margin-top: 20rpx;
+
+        .center-text {
+          font-size: 32rpx;
+        }
+
+        .center-img-box {
+          margin-top: 20rpx;
+          display: grid;
+          grid-template-columns: 32% 32% 32%;
+          gap: 4% 1%;
+          margin-bottom: 10rpx;
+
+          .center-img {
+            width: 186rpx;
+            height: 186rpx;
+            border-radius: 6rpx;
+          }
+        }
+      }
+
+      .item-bottom {
+        display: flex;
+        // margin-top: 10rpx;
+        margin-bottom: 56rpx;
+        margin-right: 8rpx;
+        justify-content: flex-end;
+
+        .bottom-item {
+          display: flex;
+          align-items: center;
+          min-width: 100rpx;
+
+          .iconNUm {
+            margin-left: 7rpx;
+          }
+        }
+      }
+    }
+  }
+
+  .flex-box {
+    width: 120rpx;
+    height: 120rpx;
+    border-radius: 50%;
+    background-color: #000;
+    position: fixed;
+    bottom: 15%;
+    right: 5%;
+    box-shadow: 0 5rpx 15rpx 0 rgba(0, 0, 0, 0.5);
+    padding: 10rpx;
+    box-sizing: border-box;
+    text-align: center;
+
+    .flex {
+      color: #fff;
+      font-size: 26rpx;
+      font-weight: bold;
+
+      .flex-icon {
+        display: flex;
+        justify-content: center;
+      }
+    }
+  }
+}
+</style>

+ 4 - 4
src/pages/community/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="container">
-    <u-sticky bgColor="#F8F8F8">
+    <u-sticky bgColor="#fff">
       <view class="top"> </view>
       <u-tabs
         :list="list1"
@@ -21,7 +21,7 @@
         itemStyle=" padding-left: 15px; padding-right: 15px; height: 34px;"
       >
       </u-tabs>
-      <view class="top-bottom"> </view>
+      <!-- <view class="top-bottom"> </view> -->
     </u-sticky>
 
     <view class="center-box">
@@ -75,7 +75,7 @@
         <view class="flex-icon">
           <u-icon name="edit-pen" color="#fff" size="26"></u-icon>
         </view>
-        <view class=""> 发布 </view>
+        <view> 发布 </view>
       </view>
     </view>
 
@@ -183,7 +183,7 @@ export default {
     // 点击发布按钮
     handlerToPublish() {
       uni.navigateTo({
-        url: '/pagesCustomer/communityPostReview',
+        url: '/pagesCommunity/publishReview/index',
       });
     },
     // 点赞按钮

+ 5 - 5
src/pages/message/index.vue

@@ -33,26 +33,26 @@ export default {
           img: 'message-order',
           title: '订单通知',
           text: '暂无订单通知。',
-          url: '/pagesMessage/orderNotify',
+          url: '/pagesMessage/orderNotify/index',
           numb: 0,
         },
         {
           img: 'message-evaluate',
-          title: '评通知',
+          title: '评通知',
           text: '暂无评价通知。',
-          url: '/pagesMessage/commentNotify',
+          url: '/pagesMessage/commentNotify/index',
         },
         {
           img: 'message-love',
           title: '点赞回复',
           text: '暂无点赞回复。',
-          url: '/pagesMessage/kudosNotify',
+          url: '/pagesMessage/kudosNotify/index',
         },
         {
           img: 'message-discounts',
           title: '优惠福利',
           text: '暂无优惠福利通知。',
-          url: '/pagesMessage/benefitsNotify',
+          url: '/pagesMessage/benefitsNotify/index',
           numb: 0,
         },
       ],

+ 5 - 13
src/pages/message/message copy.vue

@@ -77,23 +77,15 @@ export default {
           img: '/static/icon/tools.png',
           name: '订单通知',
           text: '暂无订单通知。',
-          url: '/pagesMessage/orderNotify',
+          url: '/pagesMessage/orderNotify/index',
           numb: 0,
         },
-        // {
-        //   id: '3',
-        //   img: '/static/icon/tools.png',
-        //   name: '支付通知',
-        //   text: '暂无支付通知。',
-        //   url: '/pages/client/clientPackage/message/orderNotice/index',
-        //   numb:0
-        // },
         {
           id: '2',
           img: '/static/icon/tools.png',
-          name: '评通知',
+          name: '评论通知',
           text: '暂无评价通知。',
-          url: '/pagesMessage/commentNotify',
+          url: '/pagesMessage/commentNotify/index',
           numb: 0,
         },
         {
@@ -101,7 +93,7 @@ export default {
           img: '/static/icon/tools.png',
           name: '点赞回复',
           text: '暂无点赞回复。',
-          url: '/pagesMessage/kudosNotify',
+          url: '/pagesMessage/kudosNotify/index',
           numb: 0,
         },
         {
@@ -109,7 +101,7 @@ export default {
           img: '/static/icon/tools.png',
           name: '优惠福利',
           text: '暂无优惠福利通知。',
-          url: '/pagesMessage/benefitsNotify',
+          url: '/pagesMessage/benefitsNotify/index',
           numb: 0,
         },
       ],

+ 12 - 0
src/pagesCommunity/dynamicDetail/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <view>
+    <page-navbar bgColor="#fff" title="动态详情"></page-navbar>
+  </view>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 278 - 0
src/pagesCommunity/publishReview/index.vue

@@ -0,0 +1,278 @@
+<template>
+  <view class="container">
+    <page-navbar bgColor="#fff" title="发布动态"></page-navbar>
+    <view class="top-box u-m-t-20">
+      <u--textarea
+        border="none"
+        v-model="textContent"
+        count
+        placeholder="写下自己的感受分享给更多人"
+      ></u--textarea>
+      <view class="upload-box">
+        <image
+          class="upd-img"
+          :key="index"
+          v-for="(item, index) of fileList"
+          :src="item"
+          mode="aspectFill"
+        >
+        </image>
+        <view class="upload-item" @click="handlerUploadImg" v-if="fileList.length < 9">
+          <image class="img" src="@/static/images/uploadImg.png" mode=""></image>
+        </view>
+      </view>
+    </view>
+    <view class="item-box" @click="handlerGetLocation">
+      <view class="item-left">
+        <u-icon name="map" size="22"></u-icon>
+        <span class="fs-bold">你在哪里</span>
+        <span class="left-text">{{ address }}</span>
+      </view>
+      <view class="item-right">
+        <u-icon name="arrow-right"></u-icon>
+      </view>
+    </view>
+    <view class="btn-box">
+      <button class="btn" @click="handlerPublishBtn">发布</button>
+    </view>
+  </view>
+</template>
+<script>
+import { addClientContent } from '@/api/client/community.js';
+import { getCurrentLocation } from '@/api/client/home';
+import { mapGetters } from 'vuex';
+import { uploadFile } from '@/utils/upload';
+export default {
+  data() {
+    return {
+      textContent: '',
+      fileList: [],
+      uploadCount: 0,
+      address: '', //当前位置
+      uploadImgList: [],
+    };
+  },
+  mounted() {
+    let { latitude, longitude } = this.location;
+    this.handlerInitLocation(latitude, longitude);
+  },
+  computed: {
+    ...mapGetters(['location', 'userId']),
+  },
+  methods: {
+    // 初始化当前位置
+    handlerInitLocation(latitude, longitude) {
+      let point = `${latitude},${longitude}`;
+      getCurrentLocation({
+        point,
+      }).then(res => {
+        this.address = res.data.name;
+      });
+    },
+    // 手动选择城市	获取位置
+    handlerGetLocation() {
+      uni.chooseLocation({
+        success: res => {
+          this.address = res.name;
+        },
+        fail: function (err) {
+          console.log('取消按钮', err);
+        },
+      });
+    },
+    // 点击发布按钮
+    handlerPublishBtn() {
+      let params = {
+        textContent: this.textContent,
+        status: 0, // 状态:0-正常;1-屏蔽
+        type: 'PURE_TEXT', // 动态类型:1-纯文字;2-图片;3-视频 允许值: PURE_TEXT, PHOTO, VIDEO
+        location: this.address, // 定位
+        userId: this.userId,
+      };
+      if (this.fileList.length != 0) {
+        params.type = 'PHOTO';
+        params.list = [];
+        this.uploadImgList.map((rs, idx) => {
+          params.list.push({
+            resourceKey: rs,
+            sort: idx,
+          });
+        });
+      }
+      addClientContent(params).then(res => {
+        if (res.code === 'OK') {
+          uni.showToast({
+            title: '发布成功',
+            icon: 'none',
+          });
+          this.textContent = '';
+          setTimeout(() => {
+            uni.navigateBack(-1);
+          }, 1500);
+          this.uploadImgList = [];
+        } else {
+          uni.showToast({
+            title: res.msg,
+            icon: 'none',
+          });
+          return;
+        }
+      });
+    },
+    // 上传头像
+    async handlerUploadImg() {
+      try {
+        const res = await uni.showActionSheet({
+          itemList: ['拍照', '从相册选择'],
+        });
+
+        if (res.tapIndex === 0) {
+          // 用户选择拍照
+          this.takePhoto();
+        } else if (res.tapIndex === 1) {
+          // 用户选择从相册选择
+          this.chooseImage();
+        }
+      } catch (error) {
+        console.error(error);
+      }
+    },
+    // 拍照
+    takePhoto() {
+      uni.chooseImage({
+        sourceType: ['camera'],
+        count: 9 - this.uploadCount,
+        success: res => {
+          const tempFilePaths = res.tempFilePaths;
+          // 调用上传图片的方法
+          tempFilePaths.map(rs => {
+            this.uploadAvatar(rs);
+          });
+        },
+        fail: error => {
+          console.error(error);
+        },
+      });
+    },
+    //从相册中选择
+    chooseImage() {
+      uni.chooseImage({
+        sourceType: ['album'],
+        count: 9 - this.uploadCount,
+        success: res => {
+          const tempFilePaths = res.tempFilePaths;
+          tempFilePaths.map(rs => {
+            this.uploadAvatar(rs);
+          });
+          // 调用上传图片的方法
+        },
+        fail: error => {
+          console.error(error);
+        },
+      });
+    },
+    // 上传头像
+    async uploadAvatar(filePath) {
+      // 在这里实现上传头像的逻辑,将filePath作为参数传入
+      let res = await uploadFile(filePath);
+      let data = JSON.parse(res.data);
+      this.fileList.push(filePath);
+      this.uploadImgList.push(data.data.url);
+      this.uploadCount = this.fileList.length;
+      // this.queryParams.avatar = filePath;
+      this.$forceUpdate(); // 手动触发组件的重新渲染
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.container {
+  position: relative;
+  background-color: #f5f7f9;
+  height: 100vh;
+
+  .top-box,
+  .item-box {
+    padding: 20rpx;
+    background-color: #fff;
+    border-radius: 20rpx;
+
+    .upload-box {
+      margin-top: 20rpx;
+      display: flex;
+      flex-wrap: wrap;
+
+      .upd-img {
+        width: 140rpx;
+        height: 140rpx;
+        border-radius: 20rpx;
+        margin: 10rpx;
+      }
+
+      .upload-item {
+        width: 140rpx;
+        height: 140rpx;
+        border: 2rpx solid #000;
+        border-radius: 20rpx;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        margin: 10rpx;
+
+        .img {
+          width: 80rpx;
+          height: 80rpx;
+          margin: 0 auto;
+        }
+      }
+    }
+  }
+
+  .item-box {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20rpx;
+
+    .item-left {
+      display: flex;
+      align-items: center;
+    }
+  }
+
+  .btn-box {
+    position: absolute;
+    bottom: 0;
+    background-color: #fff;
+    height: 100rpx;
+    padding: 20rpx;
+    width: 95%;
+    display: flex;
+    justify-content: center;
+
+    .btn {
+      width: 80%;
+      border-radius: 20rpx;
+      font-size: 28rpx;
+      color: #000;
+      background-color: #fecf4c;
+      height: 80rpx;
+      line-height: 80rpx;
+    }
+  }
+
+  .fs-bold {
+    font-weight: bold;
+    font-size: 28rpx;
+    color: #000;
+    margin-left: 10rpx;
+  }
+
+  .left-text {
+    color: #a6a7a8;
+    font-size: 28rpx;
+    margin-left: 10rpx;
+  }
+}
+</style>

+ 0 - 269
src/pagesCustomer/communityPostReview.vue

@@ -1,269 +0,0 @@
-<template>
-	<view class="container">
-		<view class="top-box">
-			<u--textarea border="none" v-model="textContent" count placeholder="写下自己的感受分享给更多人"></u--textarea>
-			<view class="upload-box">
-				<image class="upd-img" :key="index" v-for="(item, index) of fileList" :src="item" mode="aspectFill">
-				</image>
-				<view class="upload-item" @click="handlerUploadImg" v-if="fileList.length < 9">
-					<image class="img" src="@/static/images/uploadImg.png" mode=""></image>
-				</view>
-			</view>
-		</view>
-		<view class="item-box" @click="handlerGetLocation">
-			<view class="item-left">
-				<u-icon name="map" size="22"></u-icon>
-				<span class="fs-bold">你在哪里</span>
-				<span class="left-text">{{ address }}</span>
-			</view>
-			<view class="item-right">
-				<u-icon name="arrow-right"></u-icon>
-			</view>
-		</view>
-		<view class="btn-box">
-			<button class="btn" @click="handlerPublishBtn">发布</button>
-		</view>
-	</view>
-</template>
-<script>
-	import { addClientContent } from '@/api/client/community.js';
-	import { getCurrentLocation } from '@/api/client/home';
-	import { mapGetters } from "vuex"
-	import { uploadFile } from "@/utils/upload"
-	export default {
-		data() {
-			return {
-				textContent: '',
-				fileList: [],
-				uploadCount: 0,
-				address: '', //当前位置
-				uploadImgList: []
-			};
-		},
-		mounted() {
-			let {
-				latitude,
-				longitude
-			} = this.location
-			this.handlerInitLocation(latitude, longitude)
-		},
-		computed: {
-			...mapGetters(['location', 'userId'])
-		},
-		methods: {
-			// 初始化当前位置
-			handlerInitLocation(latitude, longitude) {
-				let point = `${latitude},${longitude}`
-				getCurrentLocation({
-					point
-				}).then(res => {
-					this.address = res.data.name
-				})
-			},
-			// 手动选择城市	获取位置
-			handlerGetLocation() {
-				uni.chooseLocation({
-					success: res => {
-						this.address = res.name
-					},
-					fail: function(err) {
-						console.log('取消按钮', err)
-					}
-				});
-			},
-			// 点击发布按钮
-			handlerPublishBtn() {
-				let params = {
-					textContent: this.textContent,
-					status: 0, // 状态:0-正常;1-屏蔽
-					type: 'PURE_TEXT', // 动态类型:1-纯文字;2-图片;3-视频 允许值: PURE_TEXT, PHOTO, VIDEO
-					location: this.address, // 定位
-					userId: this.userId,
-				};
-				if (this.fileList.length != 0) {
-					params.type = 'PHOTO';
-					params.list = [];
-					this.uploadImgList.map((rs, idx) => {
-						params.list.push({
-							resourceKey: rs,
-							sort: idx,
-						});
-					});
-				}
-				addClientContent(params).then(res => {
-					if (res.code === 'OK') {
-						uni.showToast({
-							title: '发布成功',
-							icon: 'none',
-						});
-						this.textContent = '';
-						setTimeout(() => {
-							uni.navigateBack(-1);
-						}, 1500);
-						this.uploadImgList = []
-					} else {
-						uni.showToast({
-							title: res.msg,
-							icon: 'none',
-						});
-						return;
-					}
-				});
-			},
-			// 上传头像
-			async handlerUploadImg() {
-				try {
-					const res = await uni.showActionSheet({
-						itemList: ['拍照', '从相册选择'],
-					});
-
-					if (res.tapIndex === 0) {
-						// 用户选择拍照
-						this.takePhoto();
-					} else if (res.tapIndex === 1) {
-						// 用户选择从相册选择
-						this.chooseImage();
-					}
-				} catch (error) {
-					console.error(error);
-				}
-			},
-			// 拍照
-			takePhoto() {
-				uni.chooseImage({
-					sourceType: ['camera'],
-					count: 9 - this.uploadCount,
-					success: res => {
-						const tempFilePaths = res.tempFilePaths;
-						// 调用上传图片的方法
-						tempFilePaths.map(rs => {
-							this.uploadAvatar(rs);
-						});
-					},
-					fail: error => {
-						console.error(error);
-					},
-				});
-			},
-			//从相册中选择
-			chooseImage() {
-				uni.chooseImage({
-					sourceType: ['album'],
-					count: 9 - this.uploadCount,
-					success: res => {
-						const tempFilePaths = res.tempFilePaths;
-						tempFilePaths.map(rs => {
-							this.uploadAvatar(rs);
-						});
-						// 调用上传图片的方法
-					},
-					fail: error => {
-						console.error(error);
-					},
-				});
-			},
-			// 上传头像
-			async uploadAvatar(filePath) {
-				// 在这里实现上传头像的逻辑,将filePath作为参数传入
-				let res = await uploadFile(filePath)
-				let data = JSON.parse(res.data)
-				this.fileList.push(filePath);
-				this.uploadImgList.push(data.data.url)
-				this.uploadCount = this.fileList.length;
-				// this.queryParams.avatar = filePath;
-				this.$forceUpdate(); // 手动触发组件的重新渲染
-			},
-		},
-	};
-</script>
-
-<style lang="scss" scoped>
-	.container {
-		position: relative;
-		background-color: #f5f7f9;
-		height: 100vh;
-
-		.top-box,
-		.item-box {
-			padding: 20rpx;
-			background-color: #fff;
-			border-radius: 20rpx;
-
-			.upload-box {
-				margin-top: 20rpx;
-				display: flex;
-				flex-wrap: wrap;
-
-				.upd-img {
-					width: 140rpx;
-					height: 140rpx;
-					border-radius: 20rpx;
-					margin: 10rpx;
-				}
-
-				.upload-item {
-					width: 140rpx;
-					height: 140rpx;
-					border: 2rpx solid #000;
-					border-radius: 20rpx;
-					display: flex;
-					flex-direction: column;
-					justify-content: center;
-					margin: 10rpx;
-
-					.img {
-						width: 80rpx;
-						height: 80rpx;
-						margin: 0 auto;
-					}
-				}
-			}
-		}
-
-		.item-box {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			margin-top: 20rpx;
-
-			.item-left {
-				display: flex;
-				align-items: center;
-			}
-		}
-
-		.btn-box {
-			position: absolute;
-			bottom: 0;
-			background-color: #fff;
-			height: 100rpx;
-			padding: 20rpx;
-			width: 95%;
-			display: flex;
-			justify-content: center;
-
-			.btn {
-				width: 80%;
-				border-radius: 20rpx;
-				font-size: 28rpx;
-				color: #000;
-				background-color: #fecf4c;
-				height: 80rpx;
-				line-height: 80rpx;
-			}
-		}
-
-		.fs-bold {
-			font-weight: bold;
-			font-size: 28rpx;
-			color: #000;
-			margin-left: 10rpx;
-		}
-
-		.left-text {
-			color: #a6a7a8;
-			font-size: 28rpx;
-			margin-left: 10rpx;
-		}
-	}
-</style>

+ 2 - 0
src/pagesHome/category/index.vue

@@ -1,5 +1,7 @@
 <template>
   <view class="u-wrap">
+    <page-navbar bgColor="#fff" title="服务类别"></page-navbar>
+
     <view class="u-menu-wrap">
       <scroll-view
         scroll-y

+ 1 - 0
src/pagesHome/marketer/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="container">
+    <page-navbar bgColor="#fff" title="商家详情"></page-navbar>
     <!-- 轮播图 -->
     <view class="carousel-map">
       <u-swiper

+ 2 - 0
src/pagesHome/productDetail/index.vue

@@ -1,5 +1,7 @@
 <template>
   <view class="service">
+    <page-navbar bgColor="#fff" title="服务详情"></page-navbar>
+
     <view class="service-content">
       <!-- 标题和轮播图 -->
       <view class="swipper-box">

+ 2 - 0
src/pagesHome/storeList/index.vue

@@ -1,5 +1,7 @@
 <template>
   <view class="container" @click="filterShow = false">
+    <page-navbar bgColor="#fff" title="商家列表"></page-navbar>
+
     <view class="top-box">
       <view class="search-box">
         <view class="search-left">

+ 12 - 11
src/pagesMessage/benefitsNotify.vue → src/pagesMessage/benefitsNotify/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="benefits">
+    <page-navbar bgColor="#fff" title="优惠福利"></page-navbar>
     <view class="list fl-flex" v-for="(item, index) in 10" :key="index">
       <view class="img">
         <image src="/static/logo.png" mode="scaleToFill" />
@@ -32,21 +33,21 @@ import { getCouponInform } from '@/api/client/message.js';
 export default {
   data() {
     return {
-      queryParams:{
-        paging:'1,10',
-        counting:true
-      }
+      queryParams: {
+        paging: '1,10',
+        counting: true,
+      },
     };
   },
-  mounted(){
-    this.handlerInitList()
+  mounted() {
+    this.handlerInitList();
   },
   methods: {
-    handlerInitList(){
-      getCouponInform(this.queryParams).then(res=>{
-        console.log("@@@@res",res)
-      })
-    }
+    handlerInitList() {
+      getCouponInform(this.queryParams).then(res => {
+        console.log('@@@@res', res);
+      });
+    },
   },
 };
 </script>

+ 2 - 0
src/pagesMessage/commentNotify.vue → src/pagesMessage/commentNotify/index.vue

@@ -1,5 +1,7 @@
 <template>
   <view class="evaluateNotice">
+    <page-navbar bgColor="#fff" title="评论通知"></page-navbar>
+
     <view class="list" v-for="(item, index) in 6" :key="index">
       <view class="fl-flex-item">
         <view class="fl-flex">

+ 19 - 18
src/pagesMessage/kudosNotify.vue → src/pagesMessage/kudosNotify/index.vue

@@ -1,6 +1,7 @@
 <template>
   <view class="LikeReply">
-    <view class="list fl-flex" v-for="item,index in 10" :key="index">
+    <page-navbar bgColor="#fff" title="点赞通知"></page-navbar>
+    <view class="list fl-flex" v-for="(item, index) in 10" :key="index">
       <image
         src="/static/icon/QR57a.jpg"
         mode="scaleToFill"
@@ -22,33 +23,33 @@
 </template>
 
 <script>
-import { getEvaluateInform , clearInformFlag } from '@/api/client/message.js';
+import { getEvaluateInform, clearInformFlag } from '@/api/client/message.js';
 export default {
   data() {
     return {
-      queryParams:{
+      queryParams: {
         // number:1,
         // size:10,
-		paging:'1,10',
-        counting:true
-      }
+        paging: '1,10',
+        counting: true,
+      },
     };
   },
-  mounted(){
-    this.handlerInitList()
+  mounted() {
+    this.handlerInitList();
   },
-  
-  onShow(){
-  	clearInformFlag({type:'EVALUATE'}).then(res=>{
-  		console.log("@@@res",res)
-  	})
+
+  onShow() {
+    clearInformFlag({ type: 'EVALUATE' }).then(res => {
+      console.log('@@@res', res);
+    });
   },
   methods: {
-    handlerInitList(){
-      getEvaluateInform(this.queryParams).then(res=>{
-        console.log("@@@@res",res)
-      })
-    }
+    handlerInitList() {
+      getEvaluateInform(this.queryParams).then(res => {
+        console.log('@@@@res', res);
+      });
+    },
   },
 };
 </script>

+ 1 - 0
src/pagesMessage/orderNotify.vue → src/pagesMessage/orderNotify/index.vue

@@ -1,5 +1,6 @@
 <template>
   <view class="orderNotice">
+    <page-navbar bgColor="#fff" title="订单通知"></page-navbar>
     <view class="order-list" v-for="(item, index) in init_list" :key="index">
       <view class="fl-flex-item order-top">
         <view class="fl-flex chelvc-chelvc-align-center">