chenjj 2 週間 前
コミット
2da323d212

+ 20 - 2
api/mine.js

@@ -5,7 +5,7 @@ import request from '../utils/request'
 export function getVolunteerAccountInfo() {
     return request({
         url: `/core/volunteer/account/getVolunteerAccountInfo`,
-
+        method: 'get',
     })
 }
 
@@ -13,6 +13,24 @@ export function getVolunteerAccountInfo() {
 export function volunteerOrderStatistics() {
     return request({
         url: `/core/volunteer/orders/volunteerOrderStatistics`,
+        method: 'get',
+    })
+}
 
+
+//查询自己的账户余额
+export function getAccountInfo() {
+    return request({
+        url: `/core/client/account/info`,
+        method: 'get',
     })
-}
+}
+
+
+//查询用户自己的账户变更记录
+export function getAccountChangeList() {
+    return request({
+        url: `/core/client/account-change`,
+        method: 'get',
+    })
+}

+ 6 - 6
components/CustomTabBar/index.vue

@@ -80,18 +80,18 @@ export default {
                     "selectedIconPath": "/static/images/tabbar/home_.png",
                     "text": "首页",
                 },
-                // {
-                //     "pagePath": "/pages/scheduling",
-                //     "iconPath": "/static/images/tabbar/class.png",
-                //     "selectedIconPath": "/static/images/tabbar/class_.png",
-                //     "text": "排班",
-                // },
                 {
                     "pagePath": "/pages/mallMenu",
                     "iconPath": "/static/images/tabbar/class.png",
                     "selectedIconPath": "/static/images/tabbar/class_.png",
                     "text": "分类",
                 },
+                // {
+                //     "pagePath": "/pages/chat",
+                //     "iconPath": "/static/images/tabbar/class.png",
+                //     "selectedIconPath": "/static/images/tabbar/class_.png",
+                //     "text": "消息",
+                // },
                 {
                     "pagePath": "/pages/classify",
                     "iconPath": "/static/images/tabbar/work.png",

+ 8 - 8
pages.json

@@ -56,9 +56,9 @@
 			}
 		},
 		{
-			"path": "pages/scheduling",
+			"path": "pages/chat",
 			"style": {
-				"navigationBarTitleText": "排班管理"
+				"navigationBarTitleText": "消息"
 			}
 		}
 	],
@@ -335,12 +335,6 @@
 				"text": "分类",
 				"visible": false
 			},
-			{
-				"pagePath": "pages/scheduling",
-				"iconPath": "static/images/tabbar/class.png",
-				"selectedIconPath": "static/images/tabbar/class_.png",
-				"text": "排班"
-			},
 			{
 				"pagePath": "pages/classify",
 				"iconPath": "static/images/tabbar/work.png",
@@ -352,6 +346,12 @@
 				"iconPath": "static/images/tabbar/mine.png",
 				"selectedIconPath": "static/images/tabbar/mine_.png",
 				"text": "我的"
+			},
+			{
+				"pagePath": "pages/chat",
+				"iconPath": "static/images/tabbar/class.png",
+				"selectedIconPath": "static/images/tabbar/class_.png",
+				"text": "消息"
 			}
 		]
 	},

+ 9 - 0
pages/chat.vue

@@ -0,0 +1,9 @@
+<template>
+    <view>
+        11
+        <custom-tab-bar :page="1"/>
+    </view>
+</template>
+<script setup>
+	import CustomTabBar from '@/components/CustomTabBar/index.vue'
+</script>

+ 6 - 3
pages/classify.vue

@@ -50,6 +50,7 @@
 		systemDictdaTalist
 	} from "@/api/userList.js"
 	import CustomTabBar from '@/components/CustomTabBar/index.vue'
+	import { wxMakePhoneCall } from '@/utils/wxRequest.js'
 	const {
 		order_status,
 		// lrr_service_status
@@ -172,9 +173,11 @@
 		}
 
 		//前往沟通
-		uni.navigateTo({
-			url: `/pages_orderuser/pages/talk/pages/index/index?orderId=${row.secondOrderId}`
-		});
+
+		// wxMakePhoneCall(phone)
+		// uni.navigateTo({
+		// 	url: `/pages_orderuser/pages/talk/pages/index/index?orderId=${row.secondOrderId}`
+		// });
 
 	}
 	provide('onClick', btnClick);

+ 2 - 3
pages/common/orderList/listItem.vue

@@ -29,10 +29,9 @@
             <view class="item-box">
                 <view class="item-btns">
                     <view class="btn-m" @click="onClick(1)" v-if="['2','4'].includes(data.orderStatus)">查看</view>
-                    <view class="btn-m" @click="onClick(2)">
-                        <!-- <up-icon name="chat" color="#ffffff" size="20"></up-icon> -->
+                    <!-- <view class="btn-m" @click="onClick(2)">
                         <text style="margin-left: 8rpx;">沟通</text>
-                    </view>
+                    </view> -->
                     <view class="btn-m" @click="onClick(1)"  v-if="['3', '1'].includes(data.orderStatus)">
                         <!-- <up-icon name="chat" color="#ffffff" size="20"></up-icon> -->
                        {{ data.orderStatus === '1' ? '开始' : '完成' }}服务

+ 7 - 6
pages/index.vue

@@ -169,19 +169,20 @@ const getList = async () => {
 		if (!res || !res.rows) {
 			return;
 		}
-
+		console.log('判断是否已经到了最后一页',pages.value.current >= Math.ceil(res.total / pages.value.pageSize));
+		
 		// 判断是否已经到了最后一页
 		if (pages.value.current >= Math.ceil(res.total / pages.value.pageSize)) {
 			loadmoreInfo.value.status = 'nomore';
+			// 将数据分成左右两列
+			res.rows.forEach((item, index) => {
+				index % 2 !== 0 ? leftList.value.push(item) : rightList.value.push(item);
+			});
 		} else {
 			loadmoreInfo.value.status = 'loadmore';
 		}
 
-		// 将数据分成左右两列
-		res.rows.forEach((item, index) => {
-			index % 2 !== 0 ? leftList.value.push(item) : rightList.value.push(item);
-		});
-
+		
 		pages.value.total = res.total;
 	} catch (error) {
 		leftList.value = [];

+ 0 - 123
pages/scheduling.vue

@@ -1,123 +0,0 @@
-<template>
-    <view class="uni-calendar">
-
-        <Calendar ref="calendar" class="uni-calendar--hook" :clear-date="false" :date="info.date" :insert="info.insert"
-            :lunar="info.lunar" :range="info.range" @change="change" :clearDate="true" @confirm="confirm"
-            :selected="selected" @delete="onDelete" />
-
-        <CustomTabBar :page="1" />
-    </view>
-</template>
-<script setup>
-import {
-		ref,
-		onMounted,
-		watch,
-		computed,
-		provide
-	} from 'vue';
-	import {
-		workDate,
-		getDataTime,
-		getVolunteerInfo
-	} from '@/api/volunteer.js'
-    import {
-		volunteerSeachgetTreeList,
-		volunteerDataList
-	} from "@/api/volunteerDetailsApi/details.js"
-    import {
-	onLoad,
-	onShow
-} from '@dcloudio/uni-app';
-import CustomTabBar from '@/components/CustomTabBar/index.vue'
-import Calendar from '@/components/uni-calendar/components/uni-calendar/uni-calendar.vue'
-
-const selected = ref([])
-const info = ref({
-    lunar: true,
-    range: true,
-    insert: true,
-})
-const calendar = ref(null)
-const change = (e) => {
-    console.log('change', e);
-    let dates = [{
-        date: e.fulldate,
-        info: `${e.time.startTime}~${e.time.endTime}`,
-        time: e.time
-    }]
-    if (e.range.before && e.range.after) {
-        dates = e.range.data.map(item => {
-            return {
-                date: item,
-                info: `${e.time.startTime}~${e.time.endTime}`,
-                time: e.time
-            }
-        })
-    }
-    selected.value = [...selected.value, ...dates]
-}
-
-const onDelete = (e) => {
-    selected.value = selected.value.filter(item => {
-        console.log('item.fulldate !== e.date', item.date, e.fulldate);
-
-        return item.date !== e.fulldate
-    })
-    console.log(e, selected.value);
-}
-
-const confirm = (e) => {
-    const parmas = handleDates.value;
-    console.log('确定', parmas);
-    workDate(parmas).then(res => {
-        if (res.code == 200) {
-            uni.showToast({
-                title: '修改成功',
-                icon: 'success',
-                success: () => {
-                    setTimeout(() => {
-                        close();
-                    }, 1000)
-                }
-            })
-
-            return;
-        }
-        uni.showToast({
-            title: res.msg,
-            icon: 'none'
-        })
-    })
-};
-const close = () => {
-    calendar.value.close();
-}
-
-const init = () => {
-		getDataTime().then(res => {
-			console.log('res', res);
-			if (res.code === 200) {
-				selected.value = res.data.map(item => {
-					return {
-						date: item.workDate,
-						info: `${item.workStartTime}~${item.workEndTime}`,
-						time: {
-							startTime: item.workStartTime,
-							endTime: item.workEndTime
-						}
-					}
-				})
-				calendar.value.open();
-			}
-		})
-	}
-
-
-    onShow(() => {
-        init();
-    })
-
-	onMounted(() => {
-	});
-</script>

+ 1 - 1
pages_classify/pages/handle/index.vue

@@ -106,7 +106,7 @@ const getOrderDetail = async () => {
         // const ad_res = await getAddress(res.data.addressId);
 
         let data = res.data.secondOrder;
-        detaile.value = { ...res.data.secondOrder, ...res.data.address,serveTimes:res.data.secondOrder.updateTime }
+        detaile.value = { ...res.data.secondOrder, address:res.data.address.address,serveTimes:res.data.secondOrder.updateTime }
         if (data.orderStatus === '3') {
 
             orderStatus.value = true;

+ 61 - 24
pages_mine/pages/income/index.vue

@@ -1,25 +1,31 @@
 <template>
     <view class="income-main">
         <view class="income-header card-box">
-            <text class="income-title" @click="onShow">
+            <text class="income-title" @click="onShows">
                 2025年4月
             </text>
             <view class="income-header-right">
-                <text>收入:1212</text>
-                <text>支出:233</text>
+                <text>收入:{{ data.totalEarning }}</text>
+                <text>支出:{{ data.totalExpend }}</text>
             </view>
         </view>
 
-        <view class="card-box icome-item" v-for="item in list" :key="item.code">
+        <view class="card-box icome-item" v-for="item in data.clientAccountChangeVOlist" :key="item.code">
             <view class="card-left">
-                <img :src="baseUrl" alt="" class="income-img">
+                <!-- <img :src="baseUrl" alt="" class="income-img"> -->
+                <!-- <view class="plus-box"><up-icon name="plus" color="rgba(244, 67, 54, 1)" size="25" ></up-icon></view>
+                <view class="minus-box"> <up-icon name="minus" color="rgba(76, 175, 80, 1)" size="25" ></up-icon>></view> -->
                 <view class="card-left-text">
-                    <view class="card-left-name">{{ item.name }}</view>
-                    <view class="card-left-date">{{ item.date }}</view>
+                    <view class="card-left-name">
+                      <text>  {{ item.businessTierName }}</text>
+                      (<dict-tag :options="jlzj_money_change_type"
+                      :value="item.sourceType" />)
+                    </view>
+                    <view class="card-left-date" :style="`color: ${item.color};`">{{ item.createTime }}</view>
                 </view>
             </view>
             <view class="card-rigth">
-                {{ item.price }}
+                {{ item.changeMoney }}
             </view>
 
         </view>
@@ -32,23 +38,21 @@
 
 <script setup>
 import { ref, reactive } from 'vue';
+import { getAccountChangeList } from "@/api/mine";
+import {
+	onShow
+} from '@dcloudio/uni-app';
 import config from '@/config'
+import DictTag from '@/components/DictTag/index.vue'
+import {
+		useDict
+	} from '@/utils/dict.js';
+    const {
+        jlzj_money_change_type
+	} = useDict('jlzj_money_change_type');
 const baseUrl = config.baseUrl
-
-const list = ref([
-    {
-        name: '交易提现-到银行卡',
-        date: '2022-03-20 20:00',
-        code: '88888888888888888',
-        price: '+1212'
-    },
-    {
-        name: '交易提现-到银行卡',
-        date: '2022-03-20 20:00',
-        code: '343434343434',
-        price: '-1212'
-    }
-])
+const userType = uni.getStorageSync('userType') //读取本地存储
+const data = ref({})
 
 const show = ref(false);
 const columns = reactive([
@@ -74,7 +78,7 @@ const changeHandler = (e) => {
     }
 };
 
-const onShow = () => {
+const onShows = () => {
     show.value = true;
 };
 
@@ -83,6 +87,34 @@ const confirm = (e) => {
     show.value = false;
 };
 
+const init = async() => {
+	try {
+		uni.showLoading({
+			title: '数据加载中...'
+		});
+
+		if(userType === 2){
+			// const res = await getVolunteerAccountInfo();
+			// data.value =res.data;			
+		}
+        if(userType === 1){
+            const res = await getAccountChangeList();
+            console.log(1,res);
+            data.value = res.data;	
+        }
+	} catch (error) {
+		console.log('error', error);
+		uni.showToast({
+			title: error.msg,
+			icon: 'error',
+		});
+	} finally {
+		uni.hideLoading();
+	}
+}
+onShow(()=>{
+    init();
+})
 </script>
 
 <style lang="scss" scoped>
@@ -152,6 +184,9 @@ const confirm = (e) => {
             line-height: 23.17px;
             color: rgba(0, 0, 0, 1);
             margin-bottom: 6px;
+
+            display: flex;
+            align-items: center;
             }
             .card-left-date {
                 font-size: 14px;
@@ -170,4 +205,6 @@ const confirm = (e) => {
     }
 
 }
+
+
 </style>

+ 15 - 6
pages_mine/pages/wallet/index.vue

@@ -2,7 +2,9 @@
     <view class="wallet-main">
         <view class="wallet-hi">
             <view class="wallet-hi-title">Hi,您好!</view>
-            <text class="wallet-hi-text">为了您更好地使用钱包功能, <text class="wallet-active" @click="onAddBankCard" >添加银行卡> </text> </text>
+            <text class="wallet-hi-text">为了您更好地使用钱包功能</text>
+
+            <!-- <text class="wallet-hi-text">为了您更好地使用钱包功能, <text class="wallet-active" @click="onAddBankCard" >添加银行卡> </text> </text> -->
         </view>
         <view class="wallet-box card-box ">
             <view class="wallet-box-top">
@@ -12,11 +14,11 @@
                 </view>
                 <view>
                     <view class="wallet-box-btn1 flex-center" @click="onWithdrawal">提现</view>
-                    <view class="wallet-box-btn2 flex-center" @click="onIncome">收明细</view>
+                    <view class="wallet-box-btn2 flex-center" @click="onIncome">收明细</view>
                 </view>
             </view>
-            <up-divider></up-divider>
-            <view class="wallet-box-bottom">
+            <up-divider v-if="userType === 2"></up-divider>
+            <view class="wallet-box-bottom" v-if="userType === 2">
                 <view class="flex-center-column">
                     <text class="wallet-box-title">可提现(元)</text>
                     <view class="wallet-box-price2">{{ data.balance }}</view>
@@ -44,7 +46,7 @@
 <script setup>
 import { ref } from 'vue';
 import BankItem from '@/pages_mine/components/bank-item/bank-item.vue';
-import { getVolunteerAccountInfo } from "@/api/mine";
+import { getVolunteerAccountInfo,getAccountInfo } from "@/api/mine";
 import {
 	onShow
 } from '@dcloudio/uni-app';
@@ -65,7 +67,9 @@ const bankList = ref([
     // },
 ])
 const userType = uni.getStorageSync('userType') //读取本地存储
-const data = ref({});
+const data = ref({
+    balance: 0
+});
 const onWithdrawal = () => {
     uni.navigateTo({
         url: '/pages_mine/pages/withdrawal/index'
@@ -100,6 +104,11 @@ const init = async() => {
 			const res = await getVolunteerAccountInfo();
 			data.value =res.data;			
 		}
+        if(userType === 1){
+            const res = await getAccountInfo();
+            console.log(1,res);
+            data.value = res.data;	
+        }
 	} catch (error) {
 		console.log('error', error);
 		uni.showToast({