王文杰 8 months ago
parent 171d9fffda
commit fe684bd7df

@ -11,7 +11,14 @@
"^Xtx(.*)": "@/components/Xtx$1.vue"
}
},
"pages": [
"pages": [{
"path": "pages/my/my",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/booking/booking",
"style": {
@ -25,7 +32,7 @@
}
},
//pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
@ -35,12 +42,6 @@
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/serviceSite/serviceSite",
"style": {
"navigationBarTitleText": "服务站列表"
}
},
{
"path": "pages/siteDetail/siteDetail",
"style": {
@ -54,20 +55,7 @@
"navigationBarTitleText": "商品分类"
}
},
{
"path": "pages/orerdList/orerdList",
"style": {
"navigationBarTitleText": "订单列表"
}
},
{
"path": "pages/my/my",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/login/login",
"style": {
@ -91,7 +79,19 @@
"style": {
"navigationBarTitleText": "商品详情"
}
}
},
{
"path": "pages/serviceSite/serviceSite",
"style": {
"navigationBarTitleText": "服务站"
}
},
{
"path": "pages/orerdList/orerdList",
"style": {
"navigationBarTitleText": "订单"
}
},
],
"globalStyle": {
"navigationBarTextStyle": "black",
@ -105,31 +105,30 @@
"selectedColor": "#3775F6",
"backgroundColor": "#fff",
"borderStyle": "white",
"list": [
{
"list": [{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "static/tabs/home_default.png",
"selectedIconPath": "static/tabs/home_selected.png"
},
{
"text": "服务站",
"pagePath": "pages/serviceSite/serviceSite",
"iconPath": "static/tabs/category_default.png",
"selectedIconPath": "static/tabs/category_selected.png"
},
// {
// "text": "服务站",
// "pagePath": "pages/serviceSite/serviceSite",
// "iconPath": "static/tabs/site_default.png",
// "selectedIconPath": "static/tabs/site_selected.png"
// },
{
"text": "一键预约",
"pagePath": "pages/booking/booking",
"iconPath": "static/tabs/cart_default.png",
"selectedIconPath": "static/tabs/cart_selected.png"
},
{
"text": "订单",
"pagePath": "pages/orerdList/orerdList",
"iconPath": "static/tabs/cart_default.png",
"selectedIconPath": "static/tabs/cart_selected.png"
"iconPath": "static/tabs/booking_default.png",
"selectedIconPath": "static/tabs/booking_selected.png"
},
// {
// "text": "订单",
// "pagePath": "pages/orerdList/orerdList",
// "iconPath": "static/tabs/cart_default.png",
// "selectedIconPath": "static/tabs/cart_selected.png"
// },
{
"text": "我的",
"pagePath": "pages/my/my",
@ -139,13 +138,11 @@
]
},
//
"subPackages": [
{
"subPackages": [{
//
"root": "pagesMember",
//
"pages": [
{
"pages": [{
"path": "settings/settings",
"style": {
"navigationBarTitleText": "设置"
@ -175,8 +172,7 @@
},
{
"root": "pagesOrder",
"pages": [
{
"pages": [{
"path": "create/create",
"style": {
"navigationBarTitleText": "填写订单"

@ -3,6 +3,8 @@ import { computed, ref } from 'vue'
import { onLoad, onReady } from '@dcloudio/uni-app'
import TimePopup from './components/timePopup.vue'
import AddressPopup from './components/addressPopup.vue'
import { postBookingAPI } from '@/services/booking'
const activeMenuKey = ref(0)
const activeWeightKey = ref(0)
@ -10,12 +12,10 @@ const activeWeightKey = ref(0)
//
const longitude = ref(0)
const latitude = ref(0)
//
const timeChildPopup = ref<UniHelper.UniPopupInstance>()
const addressChildPopup = ref<UniHelper.UniPopupInstance>()
const addressLabel = ref('取件地址')
const timdeLabel = ref('取件时间')
@ -63,10 +63,13 @@ const handleMenuChange = (val) => {
const handleWeightChange = (val) => {
activeWeightKey.value = val
}
const handleToto = () => {
uni.navigateTo({ url: '/pages/booking/booking-success' })
const handleBooking = async () => {
const params = {}
const res = await postBookingAPI(params)
if (res.code) {
uni.navigateTo({ url: '/pages/booking/booking-success' })
}
}
// -
const getLocationInfo = () => {
uni.getLocation({
@ -205,7 +208,7 @@ const handleAddressPopChange = (val) => {
<time-popup ref="timeChildPopup" @change="handleTimePopChange" />
<address-popup ref="addressChildPopup" @change="handleAddressPopChange" />
<view class="submit" @click="handleToto"></view>
<view class="submit" @click="handleBooking"></view>
<!-- 底部占位空盒子 -->
<view class="toolbar-height" safe-area-inset-bottom></view>
</view>

@ -1,3 +1,11 @@
<!--
* @Author: 王文杰
* @Date: 2024-03-04 14:13:16
* @LastEditors: 王文杰
* @LastEditTime: 2024-03-05 17:49:45
* @FilePath: /app-nx-personal/src/pages/index/components/CustomNavbar.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts">
//
const { safeAreaInsets } = uni.getSystemInfoSync()
@ -21,8 +29,9 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
<style lang="scss" scoped>
/* 自定义导航条 */
.navbar {
background-image: url(@/static/images/navigator_bg.png);
// background-image: url(@/static/images/navigator_bg.png);
background-size: cover;
background-color: #3775F6;
position: relative;
display: flex;
flex-direction: column;

@ -1,6 +1,5 @@
<script setup lang="ts">
import { getHomeCategoryAPI } from '@/services/home'
import type { BannerItem, CategoryItem, HotItem } from '@/types/home'
import type { BannerItem, CategoryItem } from '@/types/home'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { useMemberStore } from '@/stores'
@ -71,7 +70,6 @@ const categoryList = ref<CategoryItem[]>([
icon: 'http://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-05-06/d9ee4919-0d2c-4383-9916-2dd25f12610c.png?quality=95&imageView',
},
])
//
const longitude = ref(0)
const latitude = ref(0)

@ -35,7 +35,6 @@ const loginSuccess = (profile: LoginResult) => {
//
const memberStore = useMemberStore()
memberStore.setProfile(profile)
debugger
//
uni.showToast({ icon: 'success', title: '登录成功' })
setTimeout(() => {

@ -1,13 +1,29 @@
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { useGuessList } from '@/composables'
import { useMemberStore } from '@/stores'
//
const { safeAreaInsets } = uni.getSystemInfoSync()
//
const memberStore = useMemberStore()
const { guessRef, onScrolltolower } = useGuessList()
const servicesList = reactive([
{
id: 1,
name: '我的评价',
},
{
id: 2,
name: '积分兑换',
},
{
id: 3,
name: '意见反馈',
},
{
id: 4,
name: '客户热线',
},
])
const handleOrderList = () => {
uni.navigateTo({ url: '/pages/orerdList/orerdList' })
}
@ -20,7 +36,7 @@ const handleNewsList = () => {
</script>
<template>
<scroll-view enable-back-to-top @scrolltolower="onScrolltolower" class="viewport" scroll-y>
<scroll-view enable-back-to-top class="viewport" scroll-y>
<!-- 个人资料 -->
<view class="profile" :style="{ paddingTop: safeAreaInsets!.top + 'px' }">
<!-- 情况1已登录 -->
@ -63,30 +79,56 @@ const handleNewsList = () => {
<view class="orders">
<view class="card">
<view class="away-all">
<text class="label">回收收货里程</text>
<view class="num">12,365公里</view>
<view class="num">12,1212</view>
<text class="label">积分</text>
</view>
<view class="order-num">
<text class="label">订单总数</text>
<view class="num">1,243</view>
<view class="num">2121</view>
<text class="label">金额</text>
</view>
</view>
</view>
<view class="orders">
<view class="card">
<view class="away-all">
<text class="label">签到</text>
<view class="num">上班签到</view>
</view>
<view class="order-num">
<text class="label">员工码</text>
<view class="num">上岗扫码 快捷验证</view>
</view>
</view>
</view>
<!-- <view class="module">
<view class="module-title">我的服务</view>
<view class="module-list">
<view class="item">
<text class="label">签到</text>
<view class="num">我的评价</view>
</view>
<view class="item">
<text class="label">签到</text>
<view class="num">积分兑换</view>
</view>
<view class="item">
<text class="label">签到</text>
<view class="num">我的评价</view>
</view>
<view class="item">
<text class="label">签到</text>
<view class="num">积分兑换</view>
</view>
</view>
</view> -->
<view class="list">
<button hover-class="none" class="item arrow" @click="handleOrderList">
<image class="img" src="/static/images/order_my.png" mode="scaleToFill" />
<view class="text"> 已完成订单 </view>
</button>
<!-- <button hover-class="none" class="item arrow" open-type="feedback">问题反馈</button> -->
<button hover-class="none" class="item arrow" open-type="contact">
<image class="img" src="/static/images/kefu_my.png" mode="scaleToFill" />
<view class="text"> 联系我们 </view>
</button>
<button hover-class="none" class="item arrow" @click="handleOrderAuto">
<image class="img" src="/static/images/order_auto_my.png" mode="scaleToFill" />
<view class="text"> 自动接单 </view>
</button>
<navigator
class="settings item arrow"
url="/pagesMember/settings/settings"
@ -95,25 +137,36 @@ const handleNewsList = () => {
<image class="img" src="/static/images/lock_my.png" mode="scaleToFill" />
<view class="text"> 设置 </view>
</navigator>
<!-- <button hover-class="none" class="item arrow" open-type="contact">
<image
class="img"
src="/static/images/seting_my.png"
mode="scaleToFill"
/>
<view class="text">
检查更新
</view>
</button> -->
<navigator
class="loation item arrow"
url="/pagesMember/address/address"
hover-class="none"
>
<image class="img" src="/static/images/lock_my.png" mode="scaleToFill" />
<view class="text"> 地址 </view>
</navigator>
<button hover-class="none" class="item arrow" @click="handleNewsList">
<image class="img" src="/static/images/detail_concat.png" mode="scaleToFill" />
<view class="text"> 消息列表 </view>
</button>
<navigator
class="loation item arrow"
url="/pages/serviceSite/serviceSite"
hover-class="none"
>
<image class="img" src="/static/images/site_selected.png" mode="scaleToFill" />
<view class="text"> 服务站 </view>
</navigator>
<navigator
class="loation item arrow"
url="/pages/orderList/orderList"
hover-class="none"
>
<image class="img" src="/static/images/cart_selected.png" mode="scaleToFill" />
<view class="text"> 订单 </view>
</navigator>
</view>
<!-- 猜你喜欢 -->
<!-- <view class="guess">
<XtxGuess ref="guessRef" />
</view> -->
</scroll-view>
</template>
@ -344,9 +397,27 @@ page {
}
}
/* 猜你喜欢 */
.guess {
background-color: #f7f7f8;
margin-top: 20rpx;
.module {
margin: 40rpx 0;
.module-title {
font-size: 30rpx;
margin: 20rpx;
}
.module-list {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.item {
width: 160rpx;
height: 160rpx;
margin: 0 10rpx;
background: #F2F2FA;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
}
}
</style>

@ -29,7 +29,6 @@ const isLoading = ref(false)
const isFinish = ref(false)
const getDataList = async () => {
debugger
// 退
if (isLoading.value) return
// 退

@ -0,0 +1,21 @@
/*
* @Author:
* @Date: 2024-03-05 17:18:02
* @LastEditors:
* @LastEditTime: 2024-03-05 17:44:43
* @FilePath: /app-nx-personal/src/services/booking.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import type { PageResult } from '@/types/global'
import { http } from '@/utils/http'
/**
*
* @param data orderState
*/
export const postBookingAPI = (data: any) => {
return http<PageResult>({
method: 'POST',
url: `/order/create`,
data,
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 878 B

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -30,7 +30,6 @@ const httpInterceptor = {
// 4. 添加 token 请求头标识
const memberStore = useMemberStore()
const token = memberStore.profile?.token
debugger
if (token) {
options.header.authorization = token
}

Loading…
Cancel
Save