master
王文杰 8 months ago
parent 4aa7025340
commit 9abd719f11

@ -35,18 +35,15 @@
{ {
"path": "pages/booking/booking", "path": "pages/booking/booking",
"style": { "style": {
"navigationBarTitleText": "一键预约", "navigationBarTitleText": "一键预约"
} }
}, },
{ {
"path": "pages/booking/booking-success", "path": "pages/booking/booking-success",
"style": { "style": {
"navigationBarTitleText": "预约成功", "navigationBarTitleText": "预约成功"
} }
}, },
//pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {

@ -13,17 +13,23 @@ const memberStore = useMemberStore()
// //
const bannerList = ref<BannerItem[]>([ const bannerList = ref<BannerItem[]>([
{ {
"id": "24", id: '24',
"imgUrl": "http://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-04-15/6d202d8e-bb47-4f92-9523-f32ab65754f4.jpg", imgUrl: '/static/images/banner1.jpg',
"hrefUrl": "1013001", hrefUrl: '1013001',
"type": "1" type: '1',
}, },
{ {
"id": "22", id: '22',
"imgUrl": "http://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-04-15/4a79180a-1a5a-4042-8a77-4db0b9c800a8.jpg", imgUrl: '/static/images/banner1.jpg',
"hrefUrl": "1019000", hrefUrl: '1019000',
"type": "1" type: '1',
} },
{
hrefUrl: '1005000',
id: '321',
imgUrl: '/static/images/banner3.jpg',
type: '1',
},
]) ])
// //
const categoryList = ref<CategoryItem[]>([ const categoryList = ref<CategoryItem[]>([

@ -1,6 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { useMemberStore } from '@/stores' import { useMemberStore } from '@/stores'
import { getMemberProfileAPI } from '@/services/profile'
// //
const { safeAreaInsets } = uni.getSystemInfoSync() const { safeAreaInsets } = uni.getSystemInfoSync()
// //
@ -24,6 +26,7 @@ const servicesList = reactive([
name: '客户热线', name: '客户热线',
}, },
]) ])
const banlance = ref(0)
const handleOrderList = () => { const handleOrderList = () => {
uni.navigateTo({ url: '/pages/orerdList/orerdList' }) uni.navigateTo({ url: '/pages/orerdList/orerdList' })
@ -34,6 +37,24 @@ const handleOrderAuto = () => {
const handleNewsList = () => { const handleNewsList = () => {
uni.navigateTo({ url: '/pages/newsList/newsList' }) uni.navigateTo({ url: '/pages/newsList/newsList' })
} }
const handleMoney = () => {
}
onLoad(() => {
getMemberProfileData()
})
const getMemberProfileData = async () => {
const res = await getMemberProfileAPI()
if (res.code == 200) {
banlance.value = res.data.banlance
} else {
uni.showToast({
title: res.msg,
icon: 'none',
})
}
}
</script> </script>
<template> <template>
@ -48,7 +69,7 @@ const handleNewsList = () => {
</navigator> </navigator>
<view class="meta"> <view class="meta">
<view class="nickname"> <view class="nickname">
{{ memberStore.profile.nickname || memberStore.profile.username }} {{ memberStore.profile.nickName || memberStore.profile.username }}
</view> </view>
<navigator class="extra" url="/pagesMember/profile/profile" hover-class="none"> <navigator class="extra" url="/pagesMember/profile/profile" hover-class="none">
<text class="update">更新头像昵称</text> <text class="update">更新头像昵称</text>
@ -80,12 +101,12 @@ const handleNewsList = () => {
<!-- 我的订单 --> <!-- 我的订单 -->
<view class="orders"> <view class="orders">
<view class="card"> <view class="card">
<view class="away-all"> <!-- <view class="away-all">
<view class="num">12,1212</view> <view class="num">12,1212</view>
<text class="label">积分</text> <text class="label">积分</text>
</view> </view> -->
<view class="order-num"> <view class="order-num" @click="handleMoney">
<view class="num">2121</view> <view class="num">{{ banlance }}</view>
<text class="label">金额</text> <text class="label">金额</text>
</view> </view>
</view> </view>
@ -278,12 +299,12 @@ page {
.label { .label {
font-size: 32rpx; font-size: 32rpx;
color: #0d0d26; color: #0d0d26;
margin-top: 20rpx;
} }
.num { .num {
color: #999a9f; color: #999a9f;
font-size: 28rpx; font-size: 28rpx;
margin-top: 20rpx;
} }
} }
} }

@ -17,26 +17,26 @@ import QQMapWX from '@/libs/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.min.js'
// //
const { safeAreaInsets } = uni.getSystemInfoSync() const { safeAreaInsets } = uni.getSystemInfoSync()
// // //
const orderDetailPopup = ref<UniHelper.UniPopupInstance>() // const orderDetailPopup = ref<UniHelper.UniPopupInstance>()
const orderConfirmPopup = ref<UniHelper.UniPopupInstance>() // const orderConfirmPopup = ref<UniHelper.UniPopupInstance>()
// // //
const longitude = ref(0) // const longitude = ref(0)
const latitude = ref(0) // const latitude = ref(0)
const polyline = ref<any>([]) // //
// // interface Props {
interface Props { // id: string
id: string // state: string,
state: string, // targetLongitude: string,
targetLongitude: string, // targetLatitude: string,
targetLatitude: string, // }
} // const props = withDefaults(defineProps<Props>(), {
const props = withDefaults(defineProps<Props>(), { // id: '0',
id: '0', // state: '0',
state: '0', // targetLongitude: '121.197665',
targetLongitude: '121.197665', // targetLatitude: '31.128418',
targetLatitude: '31.128418', // })
}) const orderStatus = ref('')
// //
onReady(() => { onReady(() => {
console.log(props) console.log(props)
@ -62,7 +62,8 @@ onReady(() => {
// logisticList.value = res.result.list // logisticList.value = res.result.list
// } // }
onLoad(() => { onLoad((options) => {
orderStatus.value = options.status || 'PENDING'
// getMemberOrderByIdData() // getMemberOrderByIdData()
// buttonDriving() // buttonDriving()
}) })
@ -83,20 +84,20 @@ const phone = async () => {
}) })
} }
// //
// const onOrderConfirm = () => { const handleCancleOrder = () => {
// // //
// uni.showModal({ uni.showModal({
// content: '', content: '是否取消订单',
// confirmColor: '#3775F6', confirmColor: '#3775F6',
// success: async (success) => { success: async (success) => {
// if (success.confirm) { if (success.confirm) {
// const res = await putMemberOrderReceiptByIdAPI(query.id) // const res = await putMemberOrderReceiptByIdAPI(query.id)
// // //
// order.value = res.result // order.value = res.result
// } }
// }, },
// }) })
// } }
const handleAcceptConfirm = () => { const handleAcceptConfirm = () => {
uni.navigateTo({ url: '/payment/detail/detail' }) uni.navigateTo({ url: '/payment/detail/detail' })
} }
@ -109,7 +110,7 @@ const handleAcceptConfirm = () => {
<view class="title">待接单中</view> <view class="title">待接单中</view>
<view class="desc">预约时间2023-11-12 11:55</view> <view class="desc">预约时间2023-11-12 11:55</view>
<view class="action"> <view class="action">
<view class="button">取消订</view> <view class="button" @click="handleCancleOrder"></view>
</view> </view>
</view> </view>
</view> </view>
@ -148,24 +149,21 @@ page {
text-align: center; text-align: center;
} }
.action { .action {
display: flex;
justify-content: center;
.button { .button {
width: 200rpx; padding: 14rpx 40rpx;
padding: 20rpx 32rpx;
text-align: center; text-align: center;
border: 2rpx solid #D5D6DB; border: 2rpx solid #D5D6DB;
font-size: 30rpx; font-size: 30rpx;
font-weight: normal;
color: #0D0D26; color: #0D0D26;
border-radius: 30rpx;
} }
} }
} }
} }
.toolbar-height {
height: 100rpx;
box-sizing: content-box;
}
.toolbar { .toolbar {
position: fixed; position: fixed;
left: 0; left: 0;

@ -6,15 +6,19 @@ const bannerList = [
{ {
hrefUrl: '1005000', hrefUrl: '1005000',
id: '25', id: '25',
imgUrl: imgUrl: '/static/images/banner1.jpg',
'http://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-04-15/e83efb1b-309c-46f7-98a3-f1fefa694338.jpg',
type: '1', type: '1',
}, },
{ {
hrefUrl: '1005000', hrefUrl: '1005000',
id: '21', id: '21',
imgUrl: imgUrl: '/static/images/banner2.jpg',
'http://yjy-xiaotuxian-dev.oss-cn-beijing.aliyuncs.com/picture/2021-04-15/dfc11bb0-4af5-4e9b-9458-99f615cc685a.jpg', type: '1',
},
{
hrefUrl: '1005000',
id: '321',
imgUrl: '/static/images/banner3.jpg',
type: '1', type: '1',
}, },
] ]

@ -27,7 +27,7 @@ const getMemberProfileData = async () => {
} }
// Store // Store
memberStore.profile!.avatar = avatar memberStore.profile!.avatar = avatar
memberStore.profile!.nickname = obj.nickname memberStore.profile!.nickName = obj.nickName
} }
onLoad(() => { onLoad(() => {
@ -86,16 +86,16 @@ const onBirthdayChange: UniHelper.DatePickerOnChange = (ev) => {
// //
const onSubmit = async () => { const onSubmit = async () => {
const { nickname, gender, birthday } = profile.value const { nickName, gender, birthday } = profile.value
const params = { const params = {
headIcon: headIcon.value, headIcon: headIcon.value,
nickname, nickName,
gender, gender,
birthday: birthday + ' ' + '00:00:01', birthday: birthday + ' ' + '00:00:01',
} }
const res = await postMemberProfileAPI(params) const res = await postMemberProfileAPI(params)
// Store // Store
memberStore.profile!.nickname = nickname memberStore.profile!.nickName = nickName
uni.showToast({ icon: 'success', title: '保存成功' }) uni.showToast({ icon: 'success', title: '保存成功' })
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
@ -127,17 +127,17 @@ const onSubmit = async () => {
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="label">昵称</text> <text class="label">昵称</text>
<input class="input" type="text" placeholder="请填写昵称" v-model="profile.nickname" /> <input class="input" type="text" placeholder="请填写昵称" v-model="profile.nickName" />
</view> </view>
<view class="form-item"> <view class="form-item">
<text class="label">性别</text> <text class="label">性别</text>
<radio-group @change="onGenderChange"> <radio-group @change="onGenderChange">
<label class="radio"> <label class="radio">
<radio value="1" color="#3271E5" :checked="profile?.gender === ''" /> <radio value="1" color="#3271E5" :checked="profile?.gender === '1'" />
</label> </label>
<label class="radio"> <label class="radio">
<radio value="2" color="#3271E5" :checked="profile?.gender === ''" /> <radio value="2" color="#3271E5" :checked="profile?.gender === '2'" />
</label> </label>
</radio-group> </radio-group>

@ -1,165 +0,0 @@
<script setup lang="ts">
import { ref } from 'vue'
const sumVal = ref('0')
const payment = () => {
uni.navigateTo({ url: '/payment/success/success' })
}
</script>
<template>
<view class="viewport">
<view class="cont">
<view class="title">回收详情</view>
<view class="form">
<view class="uni-form-item uni-row">
<view class="label">废纸Kg</view>
<input class="uni-input" type="digit" name="input" placeholder="请输入" />
</view>
<view class="uni-form-item uni-row">
<view class="label">塑料Kg</view>
<input class="uni-input" type="digit" name="input" placeholder="请输入" />
</view>
<view class="uni-form-item uni-row">
<view class="label">废金属Kg</view>
<input class="uni-input" type="digit" name="input" placeholder="请输入" />
</view>
<view class="uni-form-item uni-row">
<view class="label">玻璃制品Kg</view>
<input class="uni-input" type="digit" name="input" placeholder="请输入" />
</view>
<view class="sum">
<view class="item">
<view class="label">合计</view>
<input
class="uni-input"
v-model="sumVal"
type="digit"
name="input"
placeholder="请输入"
/>
</view>
<view class="item">
<view class="label">赠送积分积分</view>
<input
class="uni-input disabled"
disabled
v-model="sumVal"
type="digit"
name="input"
placeholder="请输入"
/>
</view>
</view>
</view>
</view>
<view class="action" @click="payment"> </view>
</view>
</template>
<style lang="scss">
page {
height: 100%;
}
.viewport {
height: 100%;
display: flex;
position: relative;
flex-direction: column;
// background-color: #3775F6;
.cont {
width: 716rpx;
margin: 30rpx auto;
height: 816rpx;
padding: 20rpx 20rpx;
border-radius: 16rpx;
background: linear-gradient(180deg, #d2eeff -2%, rgba(255, 255, 255, 0) 22%), #ffffff;
box-shadow: 0px -2px 8px 0px rgba(133, 155, 180, 0.4);
.title {
border-bottom: 2rpx solid #e1e7f2;
font-size: 44rpx;
padding: 20rpx 10rpx 20rpx;
}
.form {
margin: 20rpx 0;
.uni-form-item {
margin: 20rpx 0;
// padding: 10rpx 0;
}
.uni-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.label {
margin-right: 10rpx;
color: #0d0d26;
font-size: 30rpx;
width: 260rpx;
}
.uni-input {
padding: 0 20rpx;
height: 70rpx;
flex: 1;
line-height: 70rpx;
background: #f2f2fa;
border-radius: 8rpx;
}
}
}
.sum {
margin: 60rpx 0;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin: 20rpx 0;
.label {
width: 360rpx;
color: #0d0d26;
font-size: 36rpx;
}
.uni-input {
flex: 1;
padding: 0 10rpx;
height: 70rpx;
line-height: 70rpx;
background: #f2f2fa;
border-radius: 8rpx;
&.disabled {
background: none;
}
}
}
}
}
.action {
position: absolute;
bottom: 100rpx;
left: 50%;
transform: translate(-50%, -50%);
background: linear-gradient(143deg, #51B6FF 1%, #3775F6 92%);
width: 400rpx;
height: 112rpx;
color: #fff;
display: flex;
border-radius: 100rpx;
font-size: 40rpx;
flex-direction: column;
justify-content: center;
align-items: center;
}
}</style>

@ -1,106 +0,0 @@
<script setup lang="ts">
import { ref } from 'vue'
//
const gotoHome = () => {
uni.switchTab({ url: '/pages/index/index' })
}
const gotoBack = () => {
uni.navigateBack({ delta: 1 })
}
const gotoTodo = () => {
uni.showToast({
title: 'todo...',
mask: true,
})
}
</script>
<template>
<view class="viewport">
<view class="cont">
<view class="status">
<image class="img" src="/static/images/fail_result.png" mode="scaleToFill" />
<view class="text">结算失败</view>
<view class="desc">貌似出了点问题点击下方按钮重新结算</view>
</view>
<view class="action" @click="gotoBack"> </view>
<view class="action-repeat">
<view class="desc">
主账户余额不足时可透支结算请及时提醒主账户拥有者充值充值后将自动扣除透支金额
</view>
<view class="button" @click="gotoTodo"> </view>
</view>
</view>
</view>
</template>
<style lang="scss">
page {
height: 100%;
}
.viewport {
height: 100%;
display: flex;
position: relative;
flex-direction: column;
// background-color: #3775F6;
.cont {
height: 100vh;
width: 100vw;
background: linear-gradient(180deg, #ff6666 -11%, rgba(250, 250, 253, 0) 43%), #fafafd;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.status {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.img {
width: 120rpx;
height: 120rpx;
}
.text {
color: #e30000;
margin: 20rpx 0;
font-size: 44rpx;
}
.desc {
color: #999a9f;
font-size: 30rpx;
}
}
.action {
background: linear-gradient(124deg, #fd815f 4%, #f1484a 98%);
width: 400rpx;
height: 112rpx;
margin: 100rpx 0 40rpx;
color: #fff;
display: flex;
border-radius: 100rpx;
font-size: 36rpx;
flex-direction: column;
justify-content: center;
align-items: center;
}
.action-repeat {
margin: 140rpx 60rpx 0;
.desc {
color: #999a9f;
font-size: 30rpx;
}
.button {
width: 384rpx;
margin: 40rpx auto;
border-radius: 100rpx;
color: #e30000;
border: 2rpx solid #e30000;
padding: 30rpx 120rpx;
}
}
}
}
</style>

@ -1,75 +0,0 @@
<script setup lang="ts">
import { ref } from 'vue'
//
const gotoHome = () => {
uni.switchTab({ url: '/pages/index/index' })
}
</script>
<template>
<view class="viewport">
<view class="cont">
<view class="status">
<image class="img" src="/static/images/success_result.png" mode="scaleToFill" />
<view class="text">结算成功</view>
<view class="desc">当前剩余3个订单未处理请尽快处理</view>
</view>
<view class="action" @click="gotoHome"> </view>
</view>
</view>
</template>
<style lang="scss">
page {
height: 100%;
}
.viewport {
height: 100%;
display: flex;
position: relative;
flex-direction: column;
// background-color: #3775F6;
.cont {
height: 100vh;
width: 100vw;
background: linear-gradient(180deg, #5089ff -13%, rgba(250, 250, 253, 0) 43%), #fafafd;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.status {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.img {
width: 120rpx;
height: 120rpx;
}
.text {
color: #3d3d3d;
margin: 20rpx 0;
font-size: 44rpx;
}
.desc {
color: #999a9f;
font-size: 30rpx;
}
}
.action {
background: linear-gradient(149deg, #51b6ff 19%, #3775f6 82%);
width: 400rpx;
height: 112rpx;
margin: 200rpx 0 40rpx;
color: #fff;
display: flex;
border-radius: 100rpx;
font-size: 36rpx;
flex-direction: column;
justify-content: center;
align-items: center;
}
}
}
</style>

@ -1,17 +0,0 @@
import { http } from '@/utils/http'
import type { PageParams } from '@/types/global'
import type { HotResult } from '@/types/hot'
type HotParams = PageParams & { subType?: string }
/**
*
* @param url
* @param data
*/
export const getHotRecommendAPI = (url: string, data?: HotParams) => {
return http<HotResult>({
method: 'GET',
url,
data,
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 KiB

@ -11,8 +11,8 @@
* 4. token * 4. token
*/ */
import { useMemberStore } from '@/stores' import { useMemberStore } from '@/stores'
// const baseURL = 'http://192.168.0.166:8808/api' const baseURL = 'http://192.168.0.166:8808/api'
const baseURL = 'http://222.71.165.188:8808/api' // const baseURL = 'http://222.71.165.188:8808/api'
// 添加拦截器 // 添加拦截器
const httpInterceptor = { const httpInterceptor = {
// 拦截前触发 // 拦截前触发

Loading…
Cancel
Save