chenjj 3 days ago
parent
commit
9c546993bb

+ 6 - 4
pages/chat.vue

@@ -15,7 +15,7 @@
                             收到{{kf_count}}条客服对话
                             <view class="chat-num sys-ab" v-if="kf_count > 0">{{ kf_count }}</view>
                         </view>
-                        <view class="chat-sys-btn">去查看</view>
+                        <view class="chat-sys-btn" @click="onKf">去查看</view>
                     </view>
                     <view class="chat-sys-item">
                         <view class="chat-sys-title">收到{{xt_count}}条系统提醒
@@ -37,14 +37,16 @@
                         ]" @click="handleDelete(item)">
                             <template #default>
                                 <view class="chat-item" @click="onClick(item)">
+                                    <img src="/static/serverImg/mine/system.png" alt="" class="chat-img" v-if="item.conversationType === '1'" />
+                                    <img src="/static/serverImg/mine/customer.png" alt="" class="chat-img" v-else-if="item.conversationType === '3'" />
 
-                                    <img v-if="item.conversationAvatar" :src="item.conversationAvatar" alt=""
+                                    <img v-else :src="item.conversationAvatar" alt=""
                                         class="chat-img" />
-                                    <img src="/static/serverImg/mine/user.png" alt="" class="chat-img" v-else />
+                                   
                                     <view class="chat-box">
                                         <view class="chat-top">
                                             <text class="chat-name">{{['1','3'].includes(item.conversationType) ? 
-                                           item.conversationType ==='1'?'系统消息' :'客服'
+                                           item.conversationType ==='1'?'系统消息' :'客服消息'
                                             :
                                                 type ? item.volunteerName : item.userName }}</text>
                                             <text class="chat-time">{{ handlerData(item.newestMsgTime ||

+ 66 - 71
pages/classify.vue

@@ -1,21 +1,15 @@
 <template>
   <view>
-    <view class="classify-main" >
-      <up-tabs
-        :list="column"
-        :scrollable="false"
-        @change="onChange"
-        :activeStyle="{
-          color: 'rgba(221, 94, 69, 1)',
-          fontWeight: 'bold',
-          transform: 'scale(1.05)',
-        }"
-        lineColor="rgba(221, 94, 69, 1)"
-        v-model:current="tabKey"
-      >
+    <view class="classify-main">
+      <up-tabs :list="column" :scrollable="false" @change="onChange" :activeStyle="{
+        color: 'rgba(221, 94, 69, 1)',
+        fontWeight: 'bold',
+        transform: 'scale(1.05)',
+      }" lineColor="rgba(221, 94, 69, 1)" v-model:current="tabKey">
       </up-tabs>
+  
       <view class="list">
-        <List :data="data" v-if="data && data.length > 0 " @refresh="getList" ref="listRef" :total="pages.total"/>
+        <List :data="data" v-if="data && data.length > 0" @refresh="getList" ref="listRef" :total="pages.total" />
         <view v-else>
           <NoneView value="您还没有相关订单" />
         </view>
@@ -26,9 +20,9 @@
 </template>
 
 <script setup>
-import { ref,computed } from 'vue'
+import { ref, computed } from 'vue'
 import List from '@/pages/common/orderList/index.vue'
-import { provide } from 'vue'
+import { provide,inject } from 'vue'
 import { getVolunteerOrderList } from '@/api/volunteer.js'
 import { onMounted } from 'vue'
 import { useDict } from '@/utils/dict.js'
@@ -42,7 +36,7 @@ const userType = uni.getStorageSync('userType') //读取本地存储
 const tab = ref('')
 const tabKey = ref(0)
 const data = ref([]) //志愿者
-const listRef =ref(null)
+const listRef = ref(null)
 /**
  * 	0待支付 1已支付 2支付超时或取消 3进行中 4已完成 5申请退款中 6已退款 7部分退款 8 待确认
  */
@@ -69,30 +63,30 @@ const admin = [
   },
 ]
 const user = [
-{
-			name: "全部",
-			value: "",
-		},
-		{
-			name: "待支付",
-			value: "0",
-		},
-		{
-			name: "待服务",
-			value: "1",
-		},
-		{
-			name: "进行中",
-			value: "3",
-		},
-		{
-			name: "已完成",
-			value: "4",
-		},
-		{
-			name: "售后",
-			value: '2,5,6,7',
-		}
+  {
+    name: "全部",
+    value: "",
+  },
+  {
+    name: "待支付",
+    value: "0",
+  },
+  {
+    name: "待服务",
+    value: "1",
+  },
+  {
+    name: "进行中",
+    value: "3",
+  },
+  {
+    name: "已完成",
+    value: "4",
+  },
+  {
+    name: "售后",
+    value: '2,5,6,7',
+  }
 ]
 
 const column = computed(() => {
@@ -100,46 +94,46 @@ const column = computed(() => {
 })
 
 const pages = ref({
-	current: 1,
-	pageSize: 10,
-	total: null,
+  current: 1,
+  pageSize: 10,
+  total: null,
 })
 async function getList(type) {
-	console.log("TCL: getList -> type", type)
+  console.log("TCL: getList -> type", type)
   try {
-  
+
     console.log(data.value.length, pages.value.total);
-    if(type === 'top'){
+    if (type === 'top') {
       data.value = [];
       pages.value.total = 0;
     }
-    if(type ==='bottom'  ){
-      if(data.value.length < pages.value.total){
+    if (type === 'bottom') {
+      if (data.value.length < pages.value.total) {
         listRef.value && listRef.value.handleBottom(true);
         pages.value.current++;
-      }else {
+      } else {
         listRef.value && listRef.value.handleBottom(false)
         return;
       }
-    }else{
+    } else {
       uni.showLoading({
         title: '数据加载中...',
       })
     }
-  
-    
+
+
     const listApi = userType === 1 ? userMainOrderList : getVolunteerOrderList
     const res = await listApi({
       orderStatus: tab.value,
       pageNum: pages.value.current,
-			pageSize: pages.value.pageSize,
+      pageSize: pages.value.pageSize,
     })
-    data.value =[...data.value,...res.rows];
+    data.value = [...data.value, ...res.rows];
     pages.value.total = res.total;
 
-    type ==='bottom'&& listRef.value && listRef.value.handleBottom(false);
+    type === 'bottom' && listRef.value && listRef.value.handleBottom(false);
+
 
- 
   } catch (error) {
     console.log('error', error)
     uni.showToast({
@@ -147,7 +141,7 @@ async function getList(type) {
       icon: 'error',
     })
   } finally {
-    if(listRef.value && listRef.value.handleRefreshing && type ==='top'){
+    if (listRef.value && listRef.value.handleRefreshing && type === 'top') {
       listRef.value.handleRefreshing(false)
     }
 
@@ -157,8 +151,8 @@ async function getList(type) {
         listRef.value && listRef.value.handleBottom(false)
       }
     }, 500)
-  
-    type !=='bottom' && uni.hideLoading()
+
+    type !== 'bottom' && uni.hideLoading()
   }
 }
 
@@ -183,11 +177,10 @@ function btnClick(row, type) {
 
   //前往沟通
   uni.navigateTo({
-  	url: `/pages_orderuser/pages/talk/pages/index/index?orderId=${row.mainOrderId}`
+    url: `/pages_orderuser/pages/talk/pages/index/index?orderId=${row.mainOrderId}`
   });
 }
 provide('onClick', btnClick)
-
 function onChange(tabItem) {
   tab.value = tabItem.value;
   pages.value.current = 1;
@@ -195,25 +188,27 @@ function onChange(tabItem) {
   getList()
 }
 onMounted(() => {
-  const token  = getToken();
-  if(token){
-    const {
-      order_status,
-    } = useDict('order_status', 'lrr_service_status')
-    provide('order_status', order_status) //订单/服务状态
-  }
+
 
 })
 
 onShow(() => {
-  
-  const initIndex = userType === 1? 2:1;//默认选中待服务
+
+  const initIndex = userType === 1 ? 2 : 1;//默认选中待服务
 
   const params = getApp().globalData.switchTabParams || {}
   tabKey.value = params.tabKey || initIndex;
   onChange(column.value[tabKey.value])
   // 使用后建议清除参数,避免重复读取
   getApp().globalData.switchTabParams = null
+
+  const token = getToken();
+  if (token) {
+    const {
+      order_status,
+    } = useDict('order_status', 'lrr_service_status')
+    provide('order_status', order_status) //订单/服务状态
+  }
 })
 </script>
 

+ 1 - 0
pages/common/orderList/userItem.vue

@@ -57,6 +57,7 @@ const props = defineProps({
 });
 
 const order_status = inject('order_status');
+console.log("TCL: order_status", order_status)
 
 const btns = [
   {

+ 2 - 2
pages_mine/components/setupUser/Add.vue

@@ -31,7 +31,7 @@
           <up-icon name="arrow-right"></up-icon>
         </template>
       </up-form-item>
-      <up-form-item
+      <!-- <up-form-item
         label="关系"
         prop="label"
         borderBottom
@@ -48,7 +48,7 @@
         <template #right>
           <up-icon name="arrow-right"></up-icon>
         </template>
-      </up-form-item>
+      </up-form-item> -->
       <up-form-item label="年龄" prop="age" borderBottom labelWidth="70">
         <up-input
           v-model="modelForm.age"

BIN
static/serverImg/mine/customer.png


BIN
static/serverImg/mine/system.png