Sfoglia il codice sorgente

评价管理与公告

忆雪 1 anno fa
parent
commit
df1e6c0fec

+ 16 - 2
src/api/merchant/evaluate.js

@@ -15,7 +15,21 @@ export function getEvaluateListApi(params) {
     },
   });
 }
-
+/**
+ * @deprecated 评价查询
+ * @param {*} params
+ * @returns
+ */
+export function getMerchantQueryApi(params) {
+  return request({
+    url: '/maintain/assess/merchantQuery',
+    data: params,
+    method: 'post',
+    // headers: {
+    //   'Content-Type': 'application/x-www-form-urlencoded',
+    // },
+  });
+}
 /**
  * @description
  * @param {*} data 商家回复
@@ -24,7 +38,7 @@ export function getEvaluateListApi(params) {
 
 export function addEvaluateRecoverApi(data) {
   return request({
-    url: `/admin/assess/recover/add`,
+    url: `/maintain/assess/addAssessRecover`,
     method: 'post',
     data: data,
     headers: {

+ 15 - 0
src/api/merchant/order.js

@@ -61,4 +61,19 @@ export function getVerificationApi(orderId,merchantId) {
     },
   });
 }
+/**
+ * 查询通知配置列表	
+ * @param {*} 
+ * @returns
+ */
+export function getNoticeApi(data) {
+  return request({
+    url: "/maintain/notice/list",
+    method: 'get',
+	data,
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded',
+    },
+  });
+}
 

+ 164 - 133
src/pageMerchant/storeModule/components/evaluateItem.vue

@@ -1,133 +1,164 @@
-<template>
-  <view class="">
-    <view class="item" :key="index" v-for="(item, index) of 3">
-      <view class="item-top">
-        <view class="top-l">
-          <img class="img" src="@/static/QR57a.jpg" alt="" />
-          <view class="l-text">
-            <p class="l-name">匿名用户</p>
-            <p class="l-time">2023-11-05</p>
-          </view>
-        </view>
-        <view class="top-r">
-          <p class="r-text">更多</p>
-          <u-icon name="arrow-right" color="#9B9B9B" size="18"></u-icon>
-        </view>
-      </view>
-
-      <view class="rate-box">
-        <span class="rate-text">评分:</span>
-        <u-rate :count="count" v-model="value"></u-rate>
-      </view>
-
-      <view class="content-box">
-        <p class="content-text">
-          服务非常好服务非常好服务非常好服务非常好服务非常好服务非常好服务非常好
-        </p>
-        <view class="content-img-box">
-          <img class="content-img" src="@/static/QR57a.jpg" v-for="itm of 6" />
-        </view>
-      </view>
-
-      <view class="btn-box">
-        <view class="btn" @click="handlerSkipBack">回复</view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      count: 5,
-      value: 2,
-    };
-  },
-  methods: {
-    // 点击跳转到回复
-    handlerSkipBack() {
-      uni.navigateTo({
-        url: '/pages/tabbar/store/evaluateBack',
-      });
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.item {
-  background-color: #fff;
-  padding: 20rpx;
-  margin: 10rpx 0;
-  .item-top {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    .top-l {
-      display: flex;
-      align-items: center;
-      .img {
-        width: 120rpx;
-        height: 120rpx;
-        border-radius: 50%;
-      }
-      .l-text {
-        .l-name {
-          font-size: 28rpx;
-          color: #777777;
-        }
-        .l-time {
-          font-size: 24rpx;
-          color: #777777;
-        }
-      }
-    }
-    .top-r {
-      display: flex;
-      .r-text {
-        font-size: 26rpx;
-        color: #777777;
-      }
-    }
-  }
-
-  .rate-box {
-    display: flex;
-    font-size: 28rpx;
-    color: #777777;
-    margin: 20rpx;
-    .rate-text {
-      margin-right: 10rpx;
-    }
-  }
-
-  .content-box {
-    .content-text {
-    }
-    .content-img-box {
-      display: grid;
-      grid-template-columns: 22% 22% 22% 22%;
-      justify-content: space-around;
-      .content-img {
-        width: 180rpx;
-        height: 180rpx;
-      }
-    }
-  }
-  .btn-box {
-    display: flex;
-    justify-content: flex-end;
-    .btn {
-      background-color: #fff;
-      border: 2rpx solid #f56c6c;
-      color: #f56c6c;
-      text-align: center;
-      width: 120rpx;
-      font-size: 26rpx;
-      padding: 10rpx 0;
-      border-radius: 20rpx;
-    }
-  }
-}
-</style>
+<template>
+	<view class="">
+		<view class="item" :key="index" v-for="(item, index) of dataList">
+			<view class="item-top">
+				<view class="top-l">
+					<img class="img" src="@/static/QR57a.jpg" alt="" />
+					<view class="l-text">
+						<p class="l-name">{{item.creatorNickName?item.creatorNickName:"匿名用户"}}</p>
+						<p class="l-time">{{item.createTime | formatTime1)}}</p>
+					</view>
+				</view>
+				<view class="top-r">
+					<p class="r-text">更多</p>
+					<u-icon name="arrow-right" color="#9B9B9B" size="18"></u-icon>
+				</view>
+			</view>
+
+			<view class="rate-box">
+				<span class="rate-text">评分:</span>
+				<u-rate :count="count" v-model:value="item.score"></u-rate>
+			</view>
+
+			<view class="content-box">
+				<p class="content-text">
+					{{item.remark}}
+				</p>
+				<view class="content-img-box">
+					<img class="content-img" :src="itm.url" v-for="itm of images" />
+				</view>
+			</view>
+
+			<view class="btn-box">
+				<view class="btn" @click="handlerSkipBack(item)">回复</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		formatTime1
+	} from '@/utils/date.js'
+	export default {
+		props: {
+			// 声明接收来自父组件的数组数据
+			dataList: {
+				type: Array,
+				default: () => [] // 设置默认值为空数组,防止未传值时出现错误
+			}
+		},
+		filters: {
+			formatTime1 // 注册自定义过滤器
+		},
+		data() {
+			return {
+				count: 5,
+				value: 2,
+			};
+		},
+		mounted() {
+
+		},
+		methods: {
+			// 点击跳转到回复
+			handlerSkipBack(item) {
+				// uni.navigateTo({
+				// 	url: '/pages/tabbar/store/evaluateBack',
+				// });
+				console.log(item, "dasdadda")
+				uni.navigateTo({
+					url: `/pageMerchant/storeModule/evaluateBack?assessId=${item.id}`,
+				});
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.item {
+		background-color: #fff;
+		padding: 20rpx;
+		margin: 10rpx 0;
+
+		.item-top {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.top-l {
+				display: flex;
+				align-items: center;
+
+				.img {
+					width: 120rpx;
+					height: 120rpx;
+					border-radius: 50%;
+				}
+
+				.l-text {
+					.l-name {
+						font-size: 28rpx;
+						color: #777777;
+					}
+
+					.l-time {
+						font-size: 24rpx;
+						color: #777777;
+					}
+				}
+			}
+
+			.top-r {
+				display: flex;
+
+				.r-text {
+					font-size: 26rpx;
+					color: #777777;
+				}
+			}
+		}
+
+		.rate-box {
+			display: flex;
+			font-size: 28rpx;
+			color: #777777;
+			margin: 20rpx;
+
+			.rate-text {
+				margin-right: 10rpx;
+			}
+		}
+
+		.content-box {
+			.content-text {}
+
+			.content-img-box {
+				display: grid;
+				grid-template-columns: 22% 22% 22% 22%;
+				justify-content: space-around;
+
+				.content-img {
+					width: 180rpx;
+					height: 180rpx;
+				}
+			}
+		}
+
+		.btn-box {
+			display: flex;
+			justify-content: flex-end;
+
+			.btn {
+				background-color: #fff;
+				border: 2rpx solid #f56c6c;
+				color: #f56c6c;
+				text-align: center;
+				width: 120rpx;
+				font-size: 26rpx;
+				padding: 10rpx 0;
+				border-radius: 20rpx;
+			}
+		}
+	}
+</style>

+ 129 - 97
src/pageMerchant/storeModule/evaluateBack.vue

@@ -1,97 +1,129 @@
-<template>
-  <view class="container">
-    <view class="top-box">
-      <u--textarea v-model="value1" placeholder="请输入内容" count></u--textarea>
-    </view>
-
-    <view class="bottom-box">
-      <view class="text-item">
-        <view class="item-l">
-          <span >默认回复</span>
-          <span class='l-text'>(点击文本使用)</span>
-        </view>
-        <view class="item-r" @click="handlerEdit">
-           {{ editType ? '编辑' : '保存' }}
-        </view>
-      </view>
-      <u--textarea :disabled='editType' v-model="value2" placeholder="请输入内容" ></u--textarea>
-    </view>
-
-    <button class="btn" @click="handlerSubmitBtn">提交</button>
-  </view>
-</template>
-
-<script>
-  export default{
-    data(){
-      return{
-        value1:'1111111111',
-        value2:'亲爱的顾客,感谢您认可我们的服务,我们会努力做得更好,祝您生活愉快',
-        editType:true
-      }
-    },
-    methods:{
-      // 点击编辑按钮
-      handlerEdit(){
-        this.editType = !this.editType
-      },
-      // 点击提交按钮
-      handlerSubmitBtn(){
-        uni.showToast({
-          title:'提交成功',
-          icon:'none'
-        })
-        setTimeout(()=>{
-          uni.navigateBack(-1)
-        },1500)
-      }
-    }
-  }
-</script>
-
-<style lang="scss" scoped>
-  .container{
-    background-color: #F7F7F7 !important;
-    min-height: 100vh;
-    .top-box,.bottom-box{
-      background-color: #fff;
-      padding: 20rpx;
-      margin: 20rpx;
-    }
-    .bottom-box{
-      .text-item{
-        display:flex;
-        justify-content: space-between;
-        margin-bottom: 20rpx;
-        .item-l{
-          font-size: 28rpx;
-          color: #000;
-          .l-text{
-            font-size: 26rpx;
-            color: #CCCFD5;
-            margin-left: 10rpx;
-          }
-        }
-        .item-r{
-          color: #1C76D2;
-          font-size: 28rpx
-        }
-      }
-    }
-    .btn {
-      background-color: #5992BB !important;
-      color: #fff;
-      font-size: 32rpx;
-      border-radius: 40rpx;
-      margin-top: 40rpx;
-      width: 95%;
-    }
-  }
-
-  ::v-deep view.data-v-81cd9d32, scroll-view.data-v-81cd9d32, swiper-item.data-v-81cd9d32 {
-    background-color: #F7F7F7 !important;
-  }
-  ::v-deep .u-textarea__count.data-v-81cd9d32{
-    background-color: #F7F7F7 !important;
-  }
-</style>
+<template>
+	<view class="container">
+		<view class="top-box">
+			<u--textarea v-model="value1" placeholder="请输入内容" count></u--textarea>
+		</view>
+
+		<view class="bottom-box">
+			<view class="text-item">
+				<view class="item-l">
+					<span>默认回复</span>
+					<span class='l-text'>(点击文本使用)</span>
+				</view>
+				<view class="item-r" @click="handlerEdit">
+					{{ editType ? '编辑' : '保存' }}
+				</view>
+			</view>
+			<u--textarea :disabled='editType' v-model="value2" placeholder="请输入内容"></u--textarea>
+		</view>
+
+		<button class="btn" @click="handlerSubmitBtn">提交</button>
+	</view>
+</template>
+
+<script>
+	import {
+		addEvaluateRecoverApi
+	} from '@/api/merchant/evaluate';
+	export default {
+
+		data() {
+			return {
+				value1: '',
+				value2: '亲爱的顾客,感谢您认可我们的服务,我们会努力做得更好,祝您生活愉快',
+				editType: true,
+				assessId: "",
+			}
+		},
+		onLoad(query) {
+			console.log(query, "query")
+			this.assessId = query.assessId
+		},
+		methods: {
+			async request(assessId, recoverMsg) {
+				const res = await addEvaluateRecoverApi({
+					assessId,
+					recoverMsg
+				})
+				console.log(res, "sdad")
+				
+				if(res.code == "OK"){
+					uni.showToast({
+						title: '提交成功',
+						icon: 'none'
+					})
+					setTimeout(() => {
+						uni.navigateBack(-1)
+					}, 1500)
+				}
+			 
+			},
+			// 点击编辑按钮
+			handlerEdit() {
+				this.editType = !this.editType
+			},
+			// 点击提交按钮
+			handlerSubmitBtn() {
+				const value = this.value1 ? this.value1 : this.value2;
+				this.request(this.assessId, value);
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		background-color: #F7F7F7 !important;
+		min-height: 100vh;
+
+		.top-box,
+		.bottom-box {
+			background-color: #fff;
+			padding: 20rpx;
+			margin: 20rpx;
+		}
+
+		.bottom-box {
+			.text-item {
+				display: flex;
+				justify-content: space-between;
+				margin-bottom: 20rpx;
+
+				.item-l {
+					font-size: 28rpx;
+					color: #000;
+
+					.l-text {
+						font-size: 26rpx;
+						color: #CCCFD5;
+						margin-left: 10rpx;
+					}
+				}
+
+				.item-r {
+					color: #1C76D2;
+					font-size: 28rpx
+				}
+			}
+		}
+
+		.btn {
+			background-color: #5992BB !important;
+			color: #fff;
+			font-size: 32rpx;
+			border-radius: 40rpx;
+			margin-top: 40rpx;
+			width: 95%;
+		}
+	}
+
+	::v-deep view.data-v-81cd9d32,
+	scroll-view.data-v-81cd9d32,
+	swiper-item.data-v-81cd9d32 {
+		background-color: #F7F7F7 !important;
+	}
+
+	::v-deep .u-textarea__count.data-v-81cd9d32 {
+		background-color: #F7F7F7 !important;
+	}
+</style>

+ 233 - 209
src/pageMerchant/storeModule/evaluateManagement.vue

@@ -1,209 +1,233 @@
-<template>
-  <view class="container">
-    <view class="top-box">
-      <view class="top-l">
-        <view class="l-l"> {{ value.toFixed(1) }} </view>
-        <view class="l-r">
-          <u-rate :count="count" v-model="value"></u-rate>
-          <p>根据近90天评价计其所得</p>
-        </view>
-      </view>
-      <view class="top-r">
-        <span>更多</span>
-        <u-icon name="arrow-right" color="#9B9B9B" size="18"></u-icon>
-      </view>
-    </view>
-
-    <view class="content-box">
-      <view class="top-box">
-        <u-tabs
-          :list="list1"
-          lineWidth="30"
-          lineColor="$uni-bg-color-primary"
-          :activeStyle="{
-            color: '#000',
-            fontSize: '28rpx',
-            transform: 'scale(1.05)',
-            marginBottom: '15rpx',
-          }"
-          :inactiveStyle="{
-            color: '#333',
-            fontSize: '30rpx',
-            transform: 'scale(1)',
-            marginBottom: '15rpx',
-          }"
-        ></u-tabs>
-      </view>
-      <view class="item-box">
-        <view
-          class="item"
-          :class="current == index ? 'act-item' : ''"
-          v-for="(item, index) of contentList"
-          :key="index"
-          @click="handlerSelectItem(item, index)"
-          >{{ item.name }}{{ item.numb }}</view
-        >
-      </view>
-      <view class="item-radio-box">
-        <u-radio-group v-model="radiovalue1" placement="row">
-          <u-radio
-            :customStyle="{ margin: '8px' }"
-            v-for="(item, index) in radiolist1"
-            :key="index"
-            :label="item.name"
-            :name="item.name"
-          >
-          </u-radio>
-        </u-radio-group>
-      </view>
-    </view>
-
-    <evaluateItem></evaluateItem>
-  </view>
-</template>
-
-<script>
-import evaluateItem from './components/evaluateItem.vue';
-import { getEvaluateListApi } from '@/api/merchant/evaluate';
-export default {
-  data() {
-    return {
-      current: 0,
-      count: 5,
-      value: 2,
-      list1: [
-        {
-          name: '未回复的评价',
-        },
-        {
-          name: '全部评价',
-        },
-      ],
-      contentList: [
-        {
-          name: '全部',
-          numb: 360,
-        },
-        {
-          name: '五星',
-          numb: 21,
-        },
-        {
-          name: '四星',
-          numb: 50,
-        },
-        {
-          name: '三星',
-          numb: 88,
-        },
-        {
-          name: '二星',
-          numb: 72,
-        },
-        {
-          name: '一星',
-          numb: 218,
-        },
-      ],
-      radiolist1: [
-        {
-          name: '有内容的评价',
-          disabled: false,
-        },
-        {
-          name: '有图片的评价',
-          disabled: false,
-        },
-      ],
-      // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
-      radiovalue1: '有内容的评价',
-    };
-  },
-  components: { evaluateItem },
-  methods: {
-    // 选择星级
-    handlerSelectItem(item, index) {
-      this.current = index;
-    },
-    click() {},
-    async getEvaluateList() {
-      let res = await getEvaluateListApi();
-
-      console.log(res, '@@@res');
-    },
-  },
-  mounted() {
-    this.getEvaluateList();
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.container {
-  background-color: #f5f5f5 !important;
-  min-height: calc(100vh - 20rpx);
-  padding-bottom: 20rpx;
-  .top-box {
-    background-color: #fff;
-    padding: 20rpx 40rpx;
-    display: flex;
-    justify-content: space-between;
-
-    .top-l {
-      display: flex;
-      align-items: center;
-
-      .l-l {
-        margin-right: 20rpx;
-        font-size: 42rpx;
-        color: #d32625;
-        font-weight: bold;
-      }
-
-      .l-r {
-        p {
-          margin-top: 20rpx;
-          font-size: 24rpx;
-          color: #afafaf;
-        }
-      }
-    }
-
-    .top-r {
-      display: flex;
-      align-items: center;
-      color: #afafaf;
-      font-size: 26rpx;
-    }
-  }
-
-  .content-box {
-    padding: 0 20rpx 20rpx;
-    background-color: #fff;
-    margin: 10rpx 0;
-
-    .item-box {
-      display: grid;
-      grid-template-columns: 32% 32% 32%;
-      justify-content: space-between;
-
-      .item,
-      .act-item {
-        border: 2rpx solid #e0e0e0;
-        padding: 10rpx 30rpx;
-        text-align: center;
-        margin: 20rpx;
-        font-size: 26rpx;
-        color: #999999;
-      }
-      .act-item {
-        border: 2rpx solid #87afcc !important;
-        color: #87afcc !important;
-      }
-    }
-
-    .item-radio-box {
-    }
-  }
-}
-</style>
+<template>
+	<view class="container">
+		<!-- <view class="top-box">
+      <view class="top-l">
+        <view class="l-l"> {{ value.toFixed(1) }} </view>
+        <view class="l-r">
+          <u-rate :count="count" v-model="value"></u-rate>
+          <p>根据近90天评价计其所得</p>
+        </view>
+      </view>
+      <view class="top-r">
+        <span>更多</span>
+        <u-icon name="arrow-right" color="#9B9B9B" size="18"></u-icon>
+      </view>
+    </view> -->
+
+		<view class="content-box">
+			<view class="top-box">
+				<u-tabs :current="list1Current" :list="list1" lineWidth="30" lineColor="$uni-bg-color-primary"
+					:activeStyle="{
+            color: '#000',
+            fontSize: '28rpx',
+            transform: 'scale(1.05)',
+            marginBottom: '15rpx',
+          }" :inactiveStyle="{
+            color: '#333',
+            fontSize: '30rpx',
+            transform: 'scale(1)',
+            marginBottom: '15rpx',
+			
+          }" @click="handlerSelectItem1"></u-tabs>
+			</view>
+			<view class="item-box">
+				<view class="item" :class="current == index ? 'act-item' : ''" v-for="(item, index) of contentList"
+					:key="index" @click="handlerSelectItem(item, index)">{{ item.name }}{{ item.numb }}</view>
+			</view>
+			<!-- <view class="item-radio-box">
+        <u-radio-group v-model="radiovalue1" placement="row">
+          <u-radio
+            :customStyle="{ margin: '8px' }"
+            v-for="(item, index) in radiolist1"
+            :key="index"
+            :label="item.name"
+            :name="item.name"
+          >
+          </u-radio>
+        </u-radio-group>
+      </view> -->
+		</view>
+
+		<evaluateItem :dataList="dataList"></evaluateItem>
+	</view>
+</template>
+
+<script>
+	import evaluateItem from './components/evaluateItem.vue';
+	import {
+		getEvaluateListApi,
+		getMerchantQueryApi
+	} from '@/api/merchant/evaluate';
+	import {
+		mapGetters
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				merchantId: "",
+				list1Current: 0,
+				current: 0,
+				count: 5,
+				value: 2,
+				score:"0",
+				list1: [{
+						name: '未回复的评价',
+					},
+					{
+						name: '全部评价',
+					},
+				],
+				contentList: [{
+						name: '全部',
+						numb: 360,
+					},
+					{
+						name: '五星',
+						numb: 21,
+						value: 5,
+					},
+					{
+						name: '四星',
+						numb: 50,
+						value: 4,
+					},
+					{
+						name: '三星',
+						numb: 88,
+						value: 3,
+					},
+					{
+						name: '二星',
+						numb: 72,
+						value: 2,
+					},
+					{
+						name: '一星',
+						numb: 218,
+						value: 1,
+					},
+				],
+				radiolist1: [{
+						name: '有内容的评价',
+						disabled: false,
+					},
+					{
+						name: '有图片的评价',
+						disabled: false,
+					},
+				],
+				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
+				radiovalue1: '有内容的评价',
+				dataList: [],
+			};
+		},
+		components: {
+			evaluateItem,
+
+		},
+		created() {
+			// 获取商家id
+			let merchantInfo = this.$store.state.data.merchantInfo;
+			this.merchantId = merchantInfo.merchant.id;
+			this.getEvaluateList(this.merchantId, this.list1Current, this.current);
+
+		},
+		methods: {
+		
+			handlerSelectItem1(item) {
+				this.list1Current =  item.index
+				this.getEvaluateList(this.merchantId, item.index,this.score);
+			},
+			handlerSelectItem(item, index) {
+				console.log(item, index)
+				this.current = index
+				this.score = item.value
+				this.contentList = [...this.contentList]
+				this.getEvaluateList(this.merchantId, this.list1Current, item.value);
+			},
+			async getEvaluateList(merchantId, isRecover, score) {
+				let res = await getMerchantQueryApi({
+					merchantId,
+					isRecover,
+					score
+				});
+				if (res.code == "OK") {
+					this.dataList = res.data
+					console.log("dasd")
+				}
+
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		background-color: #f5f5f5 !important;
+		min-height: calc(100vh - 20rpx);
+		padding-bottom: 20rpx;
+
+		.top-box {
+			background-color: #fff;
+			padding: 20rpx 40rpx;
+			display: flex;
+			justify-content: space-between;
+
+			.top-l {
+				display: flex;
+				align-items: center;
+
+				.l-l {
+					margin-right: 20rpx;
+					font-size: 42rpx;
+					color: #d32625;
+					font-weight: bold;
+				}
+
+				.l-r {
+					p {
+						margin-top: 20rpx;
+						font-size: 24rpx;
+						color: #afafaf;
+					}
+				}
+			}
+
+			.top-r {
+				display: flex;
+				align-items: center;
+				color: #afafaf;
+				font-size: 26rpx;
+			}
+		}
+
+		.content-box {
+			padding: 0 20rpx 20rpx;
+			background-color: #fff;
+			margin: 10rpx 0;
+
+			.item-box {
+				display: grid;
+				grid-template-columns: 32% 32% 32%;
+				justify-content: space-between;
+
+				.item,
+				.act-item {
+					border: 2rpx solid #e0e0e0;
+					padding: 10rpx 30rpx;
+					text-align: center;
+					margin: 20rpx;
+					font-size: 26rpx;
+					color: #999999;
+				}
+
+				.act-item {
+					border: 2rpx solid #87afcc !important;
+					color: #87afcc !important;
+				}
+			}
+
+			.item-radio-box {}
+		}
+	}
+</style>

+ 12 - 1
src/pageMerchant/tabbar/store.vue

@@ -61,7 +61,8 @@
 
 <script>
 	import {
-		getOrderQuantityApi
+		getOrderQuantityApi,
+		getNoticeApi
 	} from '@/api/merchant/order';
 	export default {
 		data() {
@@ -118,14 +119,23 @@
 			// 获取商家id
 			let merchantInfo = this.$store.state.data.merchantInfo;
 			this.merchantId = merchantInfo.merchant.id;
+			 
 		},
 
 		mounted() {
 			// 查商家端查询订单量以及今日收入
 			this.getOrderQuantity(this.merchantId);
+			this.getNotice()
 		},
 
 		methods: {
+			//公告接口
+			async getNotice() {
+				let res = await getNoticeApi({type:1});
+				if (res.code === 'OK') {
+					this.text1 = res.data[0].centent;
+				}
+			},
 			// 点击跳转
 			handlerSkip(item, index) {
 				console.log('index', index);
@@ -180,6 +190,7 @@
 					this.listScore = res.data;
 				}
 			},
+
 		},
 	};
 </script>

+ 3 - 3
src/pages/tabbar/community.vue

@@ -64,9 +64,9 @@
       </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' />
+   <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>
 

+ 12 - 1
src/utils/date.js

@@ -23,8 +23,19 @@ export function formatTime(daytime, format = 'YYYY-MM-DD hh:mm:ss') {
   };
 
   return format.replace(/YYYY|MM|DD|hh|mm|ss/g, matched => map[matched]);
-}
+}
 
+export function formatTime1(timestamp) {
+  const date = new Date(timestamp * 1000); // 转换为毫秒
+  const year = date.getFullYear();
+  const month = ('0' + (date.getMonth() + 1)).slice(-2);
+  const day = ('0' + date.getDate()).slice(-2);
+  const hour = ('0' + date.getHours()).slice(-2);
+  const minute = ('0' + date.getMinutes()).slice(-2);
+  const second = ('0' + date.getSeconds()).slice(-2);
+  
+  return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
+}
 /**
  * @param {*} endTime
  * @returns

+ 2 - 2
src/utils/request.js

@@ -11,10 +11,10 @@ import {
 
 // 每次请求都创建一个新的实例
 const instance = axios.create({
-  baseURL: 'https://test.api.chelvc.com',
+  // baseURL: 'https://test.api.chelvc.com',
   // baseURL: "http://192.168.68.77:11000",
   // baseURL: "https://358175z5l5.yicp.fun",
-  // baseURL: "http://localhost:11000",
+  baseURL: "http://localhost:11000",
   timeout: 10000,
   adapter: UniAdapter,
 });