Browse Source

对接流水接口

pull/6/head
longjieli 2 months ago
parent
commit
e2a99766bf
16 changed files with 463 additions and 264 deletions
  1. +2
    -2
      api/address/address.js
  2. +0
    -0
      api/amount/index.js
  3. +7
    -16
      api/date/index.js
  4. +67
    -62
      manifest.json
  5. +30
    -12
      otherPages/authentication/connectAddress/detail.vue
  6. +5
    -5
      otherPages/authentication/connectAddress/index.vue
  7. +151
    -14
      otherPages/myOrdersManage/date/detail.vue
  8. +7
    -2
      otherPages/myOrdersManage/date/index.vue
  9. +27
    -4
      otherPages/myOrdersManage/transaction/index.vue
  10. +9
    -2
      pages/login/index.scss
  11. +27
    -13
      pages/login/index.vue
  12. +36
    -30
      pages/myOrdersManage/index.vue
  13. +56
    -46
      pages/orderTakingManage/index.vue
  14. +18
    -1
      pages/userManage/index.vue
  15. +11
    -50
      pages/workbenchManage/index.vue
  16. +10
    -5
      store/modules/user.js

+ 2
- 2
api/address/address.js View File

@ -38,9 +38,9 @@ export const insertAddress = (data) => {
} }
// 地址-地址修改 // 地址-地址修改
export const udpateAddress = () => {
export const udpateAddress = (data) => {
return request({ return request({
url: '/prod-api/applet/address/udpateAddress',
url: '/applet/address/udpateAddress',
headers: { headers: {
isToken: true isToken: true
}, },


api/amount/amount.js → api/amount/index.js View File


+ 7
- 16
api/date/index.js View File

@ -7,40 +7,31 @@ export function deleteOutDate(data) {
'url': '/applet/outDate/deleteOutDate', 'url': '/applet/outDate/deleteOutDate',
'method': 'post', 'method': 'post',
data data
}).then(res => {
return res.data
}) })
} }
// 接单地址-不接单日期添加 // 接单地址-不接单日期添加
export function deleteOutDate(data) {
export function insertOutDate(data) {
return request({ return request({
'url': '/applet/outDate/insertOutDate', 'url': '/applet/outDate/insertOutDate',
'method': 'post', 'method': 'post',
data data
}).then(res => {
return res.data
}) })
} }
// 接单地址-不接单日期列表数据查询 // 接单地址-不接单日期列表数据查询
export function deleteOutDate(params) {
export function outDateList() {
return request({ return request({
'url': '​/applet​/outDate​/outDateList',
'method': 'get',
params
}).then(res => {
return res.data
'url': '​/applet/outDate/outDateList',
'method': 'get'
}) })
} }
// 接单地址-不接单日期修改s
export function deleteOutDate(data) {
// 接单地址-不接单日期修改
export function udpateOutDate(data) {
return request({ return request({
'url': '/prod-api/applet/outDate/udpateOutDate',
'url': '/applet/outDate/udpateOutDate',
'method': 'post', 'method': 'post',
data data
}).then(res => {
return res.data
}) })
} }

+ 67
- 62
manifest.json View File

@ -1,63 +1,68 @@
{ {
"name": "uni-vuu3",
"appid": "",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"app-plus": {
/* 5+App */
"usingComponents": true,
"nvueCompiler": "uni-app",
"nvueStyleCompiler": "uni-app",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"modules": {},
/* */
"distribute": {
/* */
"android": {
/* android */
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios": {},
/* ios */
"sdkConfigs": {}
}
},
/* SDK */
"quickapp": {},
/* */
"mp-weixin": {
/* */
"appid": "wx01f0f43759922fda",
"setting": {
"urlCheck": false,
"postcss": true,
"minified": true
},
"usingComponents": true,
"mergeVirtualHostAttributes": true
},
"vueVersion": "3"
}
"name" : "uni-vuu3",
"appid" : "__UNI__BCA90DD",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"app-plus" : {
/* 5+App */
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"modules" : {},
/* */
"distribute" : {
/* */
"android" : {
/* android */
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios" : {},
/* ios */
"sdkConfigs" : {}
}
},
/* SDK */
"quickapp" : {},
/* */
"mp-weixin" : {
/* */
"appid" : "wx01f0f43759922fda",
"setting" : {
"urlCheck" : false,
"postcss" : true,
"minified" : true
},
"usingComponents" : true,
"mergeVirtualHostAttributes" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "获取用户地址"
}
}
},
"vueVersion" : "3"
}

+ 30
- 12
otherPages/authentication/connectAddress/detail.vue View File

@ -6,7 +6,7 @@
<view class="info-content"> <view class="info-content">
<up-form-item label="接单地址" prop="area"> <up-form-item label="接单地址" prop="area">
<view plain class="flex-rowr" @click="selectAddr"> <view plain class="flex-rowr" @click="selectAddr">
<text v-if="form.area"></text>
<text v-if="form.area">{{ form.area }}</text>
<text v-else class="placeholder">请定位选择小区或商城等</text> <text v-else class="placeholder">请定位选择小区或商城等</text>
<up-icon style="margin-left: 22rpx;" name="arrow-down" color="#7F7F7F" <up-icon style="margin-left: 22rpx;" name="arrow-down" color="#7F7F7F"
size="21rpx"></up-icon> size="21rpx"></up-icon>
@ -37,8 +37,7 @@
</template> </template>
</up-input> </up-input>
</up-form-item> </up-form-item>
<up-form-item label="不接单日期(选填)" prop="disabledDate" labelWidth="300rpx">
<!-- todo -->
<up-form-item @click="toNoOrderDate" label="不接单日期(选填)" prop="disabledDate" labelWidth="300rpx">
</up-form-item> </up-form-item>
</view> </view>
</view> </view>
@ -55,7 +54,7 @@
<view class="footer-btn"> <view class="footer-btn">
<view class="btn" @click="onSave"> <view class="btn" @click="onSave">
{{ eidtId ? '修改地址' : '新增地址'}}
{{ eidtItem ? '修改地址' : '新增地址'}}
</view> </view>
</view> </view>
</view> </view>
@ -91,10 +90,18 @@
disabledDate: [], disabledDate: [],
}) })
const rules = ref({}) const rules = ref({})
const eidtId = ref(0);
const eidtItem = ref(null);
onLoad((options) => { onLoad((options) => {
eidtId.value = options?.id || 0
eidtItem.value = options?.item ? JSON.parse(options.item) : null;
form.value = {
id: eidtItem?.value?.id || null,
area: eidtItem?.value?.area || null,
address: eidtItem?.value?.address || null,
status: eidtItem?.value?.status || null,
latitude: eidtItem?.value?.latitude || null,
longitude: eidtItem?.value?.longitude || null
}
}); });
const setAddress = (res) => { const setAddress = (res) => {
@ -123,18 +130,29 @@
} }
const onSave = async () => { const onSave = async () => {
if (eidtId.value) {
let code = null;
if (eidtItem?.value?.id) {
let result = await udpateAddress({ let result = await udpateAddress({
...form
...form.value
}) })
code = result.code
} else { } else {
// //
let result = await insertAddress({ let result = await insertAddress({
...form
...form.value
}) })
if (result.code == 200) {
uni.navigateBack()
}
code = result.code
}
if (code == 200) {
uni.navigateBack()
}
}
const toNoOrderDate = () => {
if (eidtItem?.value?.id) {
uni.navigateTo({
url: `/otherPages/myOrdersManage/date/detail?addressId=${eidtItem.value.id}`
});
} }
} }
</script> </script>


+ 5
- 5
otherPages/authentication/connectAddress/index.vue View File

@ -36,10 +36,10 @@
<view class="color-ffb size-22"> <view class="color-ffb size-22">
接单中 接单中
</view> </view>
<switch checked="true" color="#FFBF60" style="transform: scale(0.6);" />
<switch :checked="item.status" color="#FFBF60" style="transform: scale(0.6);" />
</view> </view>
<view class="flex-rowr"> <view class="flex-rowr">
<view @click="toAdd(item.id)" class="flex-rowl">
<view @click="toAdd(item)" class="flex-rowl">
<image src="@/static/images/ydd/edit.png" mode="widthFix" style="width: 20rpx;"></image> <image src="@/static/images/ydd/edit.png" mode="widthFix" style="width: 20rpx;"></image>
<text class="size-22 color-777 ml10">编辑</text> <text class="size-22 color-777 ml10">编辑</text>
</view> </view>
@ -95,10 +95,10 @@
return dateArr.map(date => dayjs(date).format('MM-DD')).join('、') return dateArr.map(date => dayjs(date).format('MM-DD')).join('、')
} }
const toAdd = (editId) => {
if(editId) {
const toAdd = (item) => {
if(item) {
uni.navigateTo({ uni.navigateTo({
url: `/otherPages/authentication/connectAddress/detail?id=${editId}`
url: `/otherPages/authentication/connectAddress/detail?item=${JSON.stringify(item)}`
}) })
}else { }else {
uni.navigateTo({ uni.navigateTo({


+ 151
- 14
otherPages/myOrdersManage/date/detail.vue View File

@ -8,43 +8,180 @@
</view> </view>
您不会再接收到选择日期内的订单 您不会再接收到选择日期内的订单
</view> </view>
<view class="buttom level" :style="{borderRadius:'31rpx'}">
<view @click="show = true" class="buttom level" :style="{borderRadius:'31rpx'}">
添加不接单日期 添加不接单日期
</view> </view>
</view> </view>
<view class="line1">
</view>
<view class="level center">
<view v-if="selectDateList.length" class="level center">
<view class=""> <view class="">
<view class="text1" :style="{ textAlign: 'right' }"> <view class="text1" :style="{ textAlign: 'right' }">
8
{{ selectDateList.length }}
</view> </view>
共不接单时间 共不接单时间
</view> </view>
<view class="level center_item"> <view class="level center_item">
<view class="">
<!-- <up-icon name="edit-pen" color="#2979ff" size="22"></up-icon> -->
<!-- <view class="">
<up-icon name="edit-pen" color="#2979ff" size="22"></up-icon>
修改 修改
</view>
<view class="">
</view> -->
<view @click="cleanDates" class="">
<!-- <up-icon name="trash" color="#2979ff" size="22"></up-icon> --> <!-- <up-icon name="trash" color="#2979ff" size="22"></up-icon> -->
清空 清空
</view> </view>
</view> </view>
</view> </view>
<view class="item box-size" :style="{borderRadius:'16rpx'}">
2月不接单
<view v-if="selectDateList.length" v-for="(dates,month) in groupedDates" :key="month" class="item box-size"
:style="{borderRadius:'16rpx'}">
{{ month }}不接单
<view class="text2"> <view class="text2">
共6天:2月19日2月22日2月24日2月27日2月28日2月29日
{{ dates.length }}:<text v-for="(item,index) in dates"
:key="index">{{ item + (index != dates.length - 1 ? "," : "") }}</text>
</view> </view>
</view> </view>
<view class="buttom_ level" :style="{borderRadius:'41rpx'}">
<view @click="submit" class="buttom_ level" :style="{borderRadius:'41rpx'}">
保存 保存
</view> </view>
</view> </view>
<up-action-sheet :actions="list" @select="selectClick" :show="show" :round="10"></up-action-sheet>
<up-calendar :show="calendarShow" color="#FFBF60" :round="10" :showTitle="false" :mode="mode" @confirm="confirm"
@close="closeCandler" :minDate="minDate" :maxDate="maxDate"></up-calendar>
</template> </template>
<script>
<script setup>
import {
ref
} from "vue"
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
insertOutDate,
outDateList
} from "@/api/date/index.js"
onLoad((options) => {
addressId.value = options.addressId
});
onShow(() => {
let response = outDateList();
console.log("返回数据",response)
})
const addressId = ref(0)
const list = ref([{
index: 0,
name: '添加不接单日期区间'
},
{
index: 1,
name: '添加不接单日期'
},
{
index: 2,
name: '取消'
}
]);
const show = ref(false);
const calendarShow = ref(false);
const mode = ref('range');
const selectDateList = ref([]);
const groupedDates = ref({}); //
const d = new Date();
const currentYear = d.getFullYear();
const minDate = `${currentYear}-01-01`;
const maxDate = `${currentYear}-12-31`;
//
const selectClick = (selectItem) => {
if (selectItem.index == 0) {
mode.value = 'range';
calendarShow.value = true;
} else if (selectItem.index == 1) {
mode.value = 'single';
calendarShow.value = true;
}
show.value = false;
};
const confirm = (e) => {
const list = [...selectDateList.value, ...e];
selectDateList.value = [...new Set(list)];
gruopDate(selectDateList.value);
calendarShow.value = false;
};
const closeCandler = () => {
calendarShow.value = false;
}
//
const gruopDate = (dateList) => {
groupedDates.value = {}
dateList.forEach(date => {
const [year, month, day] = date.split('-');
const formattedDate = `${parseInt(month)}${parseInt(day)}`;
const monthKey = `${parseInt(month)}`;
if (!groupedDates.value[monthKey]) {
groupedDates.value[monthKey] = [];
}
groupedDates.value[monthKey].push(formattedDate);
});
//
const sortedKeys = Object.keys(groupedDates.value).sort((a, b) => {
const monthA = parseInt(a.replace('月', ''));
const monthB = parseInt(b.replace('月', ''));
return monthA - monthB;
});
//
const sortedGroupedDates = {};
sortedKeys.forEach(key => {
sortedGroupedDates[key] = groupedDates.value[key];
});
// groupedDates
groupedDates.value = sortedGroupedDates;
}
const cleanDates = () => {
selectDateList.value = [];
gruopDate(selectDateList.value);
}
const submit = async () => {
if (!selectDateList.value.length) {
return uni.showToast({
title: '请选择日期',
icon: "none"
})
} else if (!addressId.value) {
return uni.showToast({
title: '地址标识不能为空',
icon: "none"
})
}
let response = await insertOutDate({
addressId: addressId.value,
date: selectDateList.value.toString()
})
if (response.code == 200) {
uni.showToast({
title: response.msg,
icon: "none"
})
uni.navigateBack(-1);
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">


+ 7
- 2
otherPages/myOrdersManage/date/index.vue View File

@ -8,7 +8,7 @@
</view> </view>
您不会再接收到选择日期内的订单 您不会再接收到选择日期内的订单
</view> </view>
<view class="buttom level" :style="{borderRadius:'31rpx'}">
<view @click="toDetail" class="buttom level" :style="{borderRadius:'31rpx'}">
添加不接单日期 添加不接单日期
</view> </view>
</view> </view>
@ -18,7 +18,12 @@
</view> </view>
</template> </template>
<script>
<script setup>
const toDetail = () => {
uni.navigateTo({
url: '/otherPages/myOrdersManage/date/detail'
});
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">


+ 27
- 4
otherPages/myOrdersManage/transaction/index.vue View File

@ -9,13 +9,14 @@
支出明细 支出明细
</view> </view>
</view> </view>
<view class="Recharge flex">
<view v-for="(item,index) in list" :key="index" class="Recharge flex">
<view class="flex"> <view class="flex">
<image src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500" <image src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500"
mode=""></image> mode=""></image>
<view class="text1"> <view class="text1">
<view class="text2"> <view class="text2">
伴宠师上门服务
{{ item.title }}
</view> </view>
<view> <view>
2020-12-29 12:54:54 2020-12-29 12:54:54
@ -23,13 +24,35 @@
</view> </view>
</view> </view>
<view class="text3"> <view class="text3">
¥200
{{ item.type == '收入' ? '+' : '-' }}{{ item.amount }}
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script>
<script setup>
import { ref } from "vue"
import { amountLogList } from "@/api/amount/index.js"
import {
onShow
} from "@dcloudio/uni-app"
onShow(() => {
getRunningWater()
})
const list = ref([]);
//
const getRunningWater = async () => {
let response = await amountLogList({
type : 1
});
if(response.code == 200) {
list.value = response.data
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">


+ 9
- 2
pages/login/index.scss View File

@ -4,14 +4,21 @@
&-logo { &-logo {
display: flex; display: flex;
align-items: center;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center;
height: 504rpx; height: 504rpx;
background: linear-gradient(360deg, #FFFFFF 0%, #FFBF60 99%); background: linear-gradient(360deg, #FFFFFF 0%, #FFBF60 99%);
image{
.logo{
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
} }
.d {
width: 200rpx;
height: 80rpx;
margin-top: 20rpx;
}
} }
&-submit{ &-submit{
padding: 0 76rpx; padding: 0 76rpx;


+ 27
- 13
pages/login/index.vue View File

@ -2,12 +2,13 @@
<view class="login"> <view class="login">
<view class="login-logo"> <view class="login-logo">
<image class="logo" :src="configList?.applet_info?.paramValueImage" mode="aspectFill"></image> <image class="logo" :src="configList?.applet_info?.paramValueImage" mode="aspectFill"></image>
<image class="d" :src="configList?.logo_icon?.paramValueImage" mode="aspectFill"></image>
</view> </view>
<view class="login-submit"> <view class="login-submit">
<up-button type="primary" text="授权手机号登录" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber"
shape="circle" color="#FFBF60"></up-button>
<up-button class="mt24" type="primary" text="微信授权登陆" @tap="loginWx" shape="circle" <up-button class="mt24" type="primary" text="微信授权登陆" @tap="loginWx" shape="circle"
color="#FFBF60"></up-button> color="#FFBF60"></up-button>
<up-button @click="cancelLogin" class="mt24" type="primary" text="取消登录" shape="circle"
color="#FFBF60"></up-button>
</view> </view>
<view class="flex-rowc"> <view class="flex-rowc">
<view class="select"> <view class="select">
@ -15,15 +16,16 @@
</view> </view>
<view class="size-26"> <view class="size-26">
<text>我已阅读并同意猫爸狗妈</text> <text>我已阅读并同意猫爸狗妈</text>
<text class="main-color">注册协议</text>
<text @click="privacyPolicy('login_xy')" class="main-color">注册协议</text>
<text></text> <text></text>
<text class="main-color">隐私政策</text>
<text @click="privacyPolicy('login_ys')" class="main-color">隐私政策</text>
</view> </view>
</view> </view>
</view> </view>
<view class="footer size-30 flex-rowc w100">
暂不登陆
</view>
<up-popup :show="show" @close="close" :round="10">
<view style="padding: 10rpx 20rpx;min-height: 50vh;" v-html="content"></view>
</up-popup>
</template> </template>
@ -55,12 +57,9 @@
const configList = computed(() => { const configList = computed(() => {
return store.getters.configList return store.getters.configList
}) })
onMounted(() => {
console.log("configList",configList)
})
const show = ref(false)
const content = ref('')
// //
const loginWx = () => { const loginWx = () => {
store.dispatch("login") store.dispatch("login")
@ -129,6 +128,21 @@
// setStorage('userInfo', data) // setStorage('userInfo', data)
// uni.navigateBack() // uni.navigateBack()
// } // }
const cancelLogin = () => {
uni.switchTab({
url: "/pages/workbenchManage/index"
})
}
const close = () => {
show.value = false
}
const privacyPolicy = (key) => {
content.value = configList.value[key]?.paramValueArea || "";
show.value = true;
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">


+ 36
- 30
pages/myOrdersManage/index.vue View File

@ -6,7 +6,7 @@
<view class="buts" :class="{'buts-active':activeIndex===2}" @click="activeIndex=2">日订单</view> <view class="buts" :class="{'buts-active':activeIndex===2}" @click="activeIndex=2">日订单</view>
</view> </view>
</view> </view>
<up-sticky bgColor="#fff" v-if="activeIndex == 1"> <up-sticky bgColor="#fff" v-if="activeIndex == 1">
<view class="container-tabs"> <view class="container-tabs">
<up-tabs :list="tabList1" lineWidth="68rpx" :activeStyle="{ <up-tabs :list="tabList1" lineWidth="68rpx" :activeStyle="{
@ -17,31 +17,25 @@
color: '#FFFFFF', color: '#FFFFFF',
transform: 'scale(1)' transform: 'scale(1)'
}" :itemStyle="{height:'88rpx',padding:'0 52rpx'}" lineColor="#FFFFFF"></up-tabs> }" :itemStyle="{height:'88rpx',padding:'0 52rpx'}" lineColor="#FFFFFF"></up-tabs>
</view>
</view>
</up-sticky> </up-sticky>
<up-sticky bgColor="#fff" v-else> <up-sticky bgColor="#fff" v-else>
<view class="container-tabs"> <view class="container-tabs">
<up-tabs :list="tabList2"
lineWidth="68rpx"
:activeStyle="{
<up-tabs :list="tabList2" lineWidth="68rpx" :activeStyle="{
color: '#FFFFFF', color: '#FFFFFF',
fontWeight: 'bold', fontWeight: 'bold',
transform: 'scale(1.05)' transform: 'scale(1.05)'
}"
:inactiveStyle="{
}" :inactiveStyle="{
color: '#FFFFFF', color: '#FFFFFF',
transform: 'scale(1)' transform: 'scale(1)'
}"
:itemStyle="{height:'88rpx',padding:'0 52rpx', width : '400rpx'}"
lineColor="#FFFFFF"></up-tabs>
}" :itemStyle="{height:'88rpx',padding:'0 52rpx', width : '400rpx'}" lineColor="#FFFFFF"></up-tabs>
</view> </view>
</up-sticky> </up-sticky>
<view class="container"> <view class="container">
<systemOrder :list="list" v-if="activeIndex == 1"/>
<orderListByData :list="list" v-else/>
<systemOrder :list="list" v-if="activeIndex == 1" />
<orderListByData :list="list" v-else />
</view> </view>
</view> </view>
</template> </template>
@ -53,19 +47,33 @@
} from "vue"; } from "vue";
import systemOrder from "./components/systemOrder.vue"; import systemOrder from "./components/systemOrder.vue";
import orderListByData from "./components/orderListByData.vue"; import orderListByData from "./components/orderListByData.vue";
import {
onShow
} from "@dcloudio/uni-app"
import {
getIsLogin
} from "@/utils/auth.js"
// import personOrder from "./components/personOrder.vue"; // import personOrder from "./components/personOrder.vue";
// import lossOrder from "./components/lossOrder.vue"; // import lossOrder from "./components/lossOrder.vue";
import { import {
getAppOrderList, getAppOrderList,
} from "@/api/order/order.js" } from "@/api/order/order.js"
onShow(() => {
if (!getIsLogin()) {
uni.navigateTo({
url: "/pages/login/index"
})
}
})
const current = ref(0) const current = ref(0)
const activeIndex = ref(1) const activeIndex = ref(1)
const list = ref([]) const list = ref([])
const tabList1 = reactive([{ const tabList1 = reactive([{
name: '待服务', name: '待服务',
badge: { badge: {
@ -85,9 +93,8 @@
} }
}, },
]) ])
const tabList2 = reactive([
{
const tabList2 = reactive([{
name: '待上门', name: '待上门',
badge: { badge: {
// value: 5, // value: 5,
@ -100,18 +107,17 @@
} }
}, },
]) ])
function getList(){
function getList() {
getAppOrderList() getAppOrderList()
.then(res => {
if(res.code == 200){
list.value = res.rows
}
})
.then(res => {
if (res.code == 200) {
list.value = res.rows
}
})
} }
getList() getList()
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">


+ 56
- 46
pages/orderTakingManage/index.vue View File

@ -1,59 +1,69 @@
<template> <template>
<view>
<up-sticky bgColor="#fff">
<view class="container-tabs">
<up-tabs :list="list" lineWidth="68rpx"
:activeStyle="{
<view>
<up-sticky bgColor="#fff">
<view class="container-tabs">
<up-tabs :list="list" lineWidth="68rpx" :activeStyle="{
color: '#FFFFFF', color: '#FFFFFF',
fontWeight: 'bold', fontWeight: 'bold',
transform: 'scale(1.05)' transform: 'scale(1.05)'
}"
:inactiveStyle="{
}" :inactiveStyle="{
color: '#FFFFFF', color: '#FFFFFF',
transform: 'scale(1)' transform: 'scale(1)'
}"
:itemStyle="{height:'88rpx',padding:'0 52rpx'}"
lineColor="#FFFFFF"></up-tabs>
</view>
</up-sticky>
}" :itemStyle="{height:'88rpx',padding:'0 52rpx'}" lineColor="#FFFFFF"></up-tabs>
</view>
</up-sticky>
<view class="container">
<systemOrder v-if="current===0"/>
<personOrder v-if="current===1"/>
<lossOrder v-if="current===2"/>
</view>
</view>
<view class="container">
<systemOrder v-if="current===0" />
<personOrder v-if="current===1" />
<lossOrder v-if="current===2" />
</view>
</view>
</template> </template>
<script setup> <script setup>
import {reactive,ref} from "vue";
import systemOrder from "./components/systemOrder.vue";
import personOrder from "./components/personOrder.vue";
import lossOrder from "./components/lossOrder.vue";
const current = ref(0)
const list = reactive([
{
name: '系统派单',
badge: {
value: 5,
}
},
{
name: '个人订单',
badge: {
value: 5,
}
},
{
name: '流失订单',
badge: {
value: 5,
}
},
])
import {
reactive,
ref
} from "vue";
import systemOrder from "./components/systemOrder.vue";
import personOrder from "./components/personOrder.vue";
import lossOrder from "./components/lossOrder.vue";
import {
onShow
} from "@dcloudio/uni-app"
import { getIsLogin } from "@/utils/auth.js"
const current = ref(0)
const list = reactive([{
name: '系统派单',
badge: {
value: 5,
}
},
{
name: '个人订单',
badge: {
value: 5,
}
},
{
name: '流失订单',
badge: {
value: 5,
}
},
])
onShow(() => {
if(!getIsLogin()) {
uni.navigateTo({
url: "/pages/login/index"
})
}
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "index.scss";
</style>
@import "index.scss";
</style>

+ 18
- 1
pages/userManage/index.vue View File

@ -25,7 +25,7 @@
<view class="flex flex-between but"> <view class="flex flex-between but">
<view>提现</view> <view>提现</view>
<view>|</view> <view>|</view>
<view>明细</view>
<view @click="toRunningWater">明细</view>
</view> </view>
</view> </view>
<view style="text-align: center"> <view style="text-align: center">
@ -110,6 +110,17 @@
import { import {
useStore useStore
} from "vuex" } from "vuex"
import {
onShow
} from "@dcloudio/uni-app"
onShow(() => {
if (!getIsLogin()) {
uni.navigateTo({
url: "/pages/login/index"
})
}
})
const store = useStore(); const store = useStore();
const isLogin = ref(false) const isLogin = ref(false)
@ -129,6 +140,12 @@
url: "/otherPages/orderTakingManage/evaluate/index" url: "/otherPages/orderTakingManage/evaluate/index"
}) })
} }
const toRunningWater = () => {
uni.navigateTo({
url: "/otherPages/myOrdersManage/transaction/index"
})
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "index"; @import "index";

+ 11
- 50
pages/workbenchManage/index.vue View File

@ -23,7 +23,7 @@
</view> </view>
<!-- 申请加入后 --> <!-- 申请加入后 -->
<view class="flex flex-between font24 flex-wrap" v-if="userInfo.userHh==1"> <view class="flex flex-between font24 flex-wrap" v-if="userInfo.userHh==1">
<view class="icon-list" @click="handleGoto(1,item)" v-for="item in iconState.list1" :key="item.id">
<view class="icon-list" @click="handleGoto(item)" v-for="item in iconState.list1" :key="item.id">
<up-image class="mb20" :show-loading="true" :src="item.image" width="68rpx" <up-image class="mb20" :show-loading="true" :src="item.image" width="68rpx"
height="68rpx"></up-image> height="68rpx"></up-image>
<view>{{item.name}}</view> <view>{{item.name}}</view>
@ -47,7 +47,7 @@
</view> </view>
<!-- 申请之后 --> <!-- 申请之后 -->
<view class="flex-rowl flex-wrap" v-if="userInfo.userBcs===1"> <view class="flex-rowl flex-wrap" v-if="userInfo.userBcs===1">
<view class="icon-list" v-for="item in iconState.list2" :key="item.id" @click="handleClick(item)">
<view class="icon-list" v-for="item in iconState.list2" :key="item.id" @click="handleGoto(item)">
<up-image class="mb20" :show-loading="true" :src="item.image" width="68rpx" <up-image class="mb20" :show-loading="true" :src="item.image" width="68rpx"
height="68rpx"></up-image> height="68rpx"></up-image>
<view>{{ item.name }}</view> <view>{{ item.name }}</view>
@ -94,9 +94,9 @@
onMounted(() => { onMounted(() => {
getBanner() getBanner()
getpz() getpz()
uni.navigateTo({
url: '/otherPages/authentication/connectAddress/index'
});
// uni.navigateTo({
// url: '/otherPages/authentication/connectAddress/index'
// });
}) })
const userInfo = computed(() => { const userInfo = computed(() => {
return store.getters.userInfo return store.getters.userInfo
@ -104,9 +104,7 @@
const configList = computed(() => { const configList = computed(() => {
return store.getters.configList return store.getters.configList
}) })
onShow(() => {
})
// //
const getBanner = async () => { const getBanner = async () => {
const res = await banner() const res = await banner()
@ -178,21 +176,11 @@
const show = ref(true) const show = ref(true)
const hhShow = ref(true) const hhShow = ref(true)
const handleGoto = (val, item) => {
switch (item.id) {
case 1:
tab.navigateTo('/otherPages/binding/list/index')
break;
case 2:
tab.navigateTo('/otherPages/workbenchManage/myUser/index')
break;
case 3:
tab.navigateTo('/otherPages/workbenchManage/myLevel/index')
break;
case 4:
// tab.navigateTo('/otherPages/binding/wallet/index')
tab.navigateTo('/otherPages/workbenchManage/myWallet/index')
break;
const handleGoto = (item) => {
if(item.url) {
uni.navigateTo({
url: item.url
})
} }
} }
// //
@ -207,33 +195,6 @@
} }
} }
const handleClick = (item) => {
switch (item.code) {
case "1":
uni.navigateTo({
url: "/otherPages/authentication/serve/index"
})
break;
case "2":
uni.navigateTo({
url: "/otherPages/authentication/serve/record"
})
break;
case "3":
uni.navigateTo({
url: "/otherPages/authentication/connectAddress/index"
})
break;
case "4":
break;
case "5":
uni.navigateTo({
url: "/otherPages/orderTakingManage/evaluate/index"
})
break;
}
}
const handleOpen = () => { const handleOpen = () => {
show.value = false show.value = false
} }


+ 10
- 5
store/modules/user.js View File

@ -33,7 +33,7 @@ const user = {
}, },
// 设置用户信息 // 设置用户信息
setUserInfo(state,userInfo) {
setUserInfo(state, userInfo) {
state.userInfo = userInfo; state.userInfo = userInfo;
} }
}, },
@ -51,10 +51,15 @@ const user = {
uni.setStorageSync("baseInfo", JSON.stringify(res.data.userInfo)) uni.setStorageSync("baseInfo", JSON.stringify(res.data.userInfo))
context.commit('setAccessToken', res.data.token); context.commit('setAccessToken', res.data.token);
context.commit('setUserInfo', res.data.userInfo); context.commit('setUserInfo', res.data.userInfo);
setIsLogin("isLogin",true);
uni.navigateTo({
url: "/pages/login/wxUserInfo"
})
setIsLogin("isLogin", true);
if (!res.data.userInfo.userName || !res.data.userInfo.userImage || !res.data.userInfo.userTelephone) {
uni.navigateTo({
url: "/pages/login/wxUserInfo"
})
}else {
uni.navigateBack(-1)
}
} }
}) })
} }


Loading…
Cancel
Save