Browse Source

1.6 个人和一点相关功能实现

hfll
hflllll 1 month ago
parent
commit
133852e0b8
20 changed files with 1304 additions and 340 deletions
  1. +2
    -2
      components/base/tabbar.vue
  2. +1
    -1
      manifest.json
  3. +3
    -0
      pages.json
  4. +5
    -3
      pages/index/cart.vue
  5. +3
    -3
      pages/index/category.vue
  6. +335
    -0
      pages/index/center.vue
  7. +4
    -4
      pages/index/index.vue
  8. +2
    -2
      pages/index/member.vue
  9. +33
    -22
      pages/index/order.vue
  10. +4
    -4
      pages_order/auth/wxLogin.vue
  11. +1
    -1
      pages_order/auth/wxUserInfo.vue
  12. +3
    -3
      pages_order/components/address/addressList.vue
  13. +2
    -2
      pages_order/location/pickupPoint.vue
  14. +304
    -0
      pages_order/mine/oldUpdateUser.vue
  15. +335
    -0
      pages_order/mine/team.vue
  16. +247
    -284
      pages_order/mine/updateUser.vue
  17. +3
    -3
      pages_order/order/afterSale.vue
  18. +3
    -3
      pages_order/order/newOrderDetail.vue
  19. +3
    -3
      pages_order/order/orderDetail.vue
  20. +11
    -0
      static/js/mockUserInfo.js

+ 2
- 2
components/base/tabbar.vue View File

@ -77,11 +77,11 @@
.tabbar-box { .tabbar-box {
height: 120rpx; height: 120rpx;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
background-color: #fff;
.tabbar { .tabbar {
position: fixed; position: fixed;
width: 750rpx; width: 750rpx;
background-color: #fff;
background-color: red;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;


+ 1
- 1
manifest.json View File

@ -52,7 +52,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wxe7ae8cbe1673834c",
"appid" : "wx94a640f07969d6c9",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },


+ 3
- 0
pages.json View File

@ -133,6 +133,9 @@
{ {
"path": "mine/updateUser" "path": "mine/updateUser"
}, },
{
"path": "mine/team"
},
{ {
"path": "order/instantGift" "path": "order/instantGift"
}, },


+ 5
- 3
pages/index/cart.vue View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<navbar></navbar> <navbar></navbar>
<text class="control-text" @click="isManaged = !isManaged">{{ isManaged ? '退出管理' : '管理' }}</text>
<text class="control-text" @tap="isManaged = !isManaged">{{ isManaged ? '退出管理' : '管理' }}</text>
<view class="cart-items"> <view class="cart-items">
<uv-checkbox-group shape="circle" v-model="checkboxValue" @change="toggleSelect"> <uv-checkbox-group shape="circle" v-model="checkboxValue" @change="toggleSelect">
@ -194,7 +194,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page {
// background-color: #f5f5f5; // background-color: #f5f5f5;
padding-bottom: 120rpx;
// padding-bottom: 120rpx;
// background-color: red;
position: relative; position: relative;
.cart-items { .cart-items {
.cart-item { .cart-item {
@ -289,7 +290,8 @@ export default {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
background-color: #fff;
background-color: yellow;
// background-color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 20rpx; padding: 0 20rpx;


+ 3
- 3
pages/index/category.vue View File

@ -10,7 +10,7 @@
<uv-search placeholder="陕西苹果" bgColor="#fff" @search="search" @change="search" @custom="search" <uv-search placeholder="陕西苹果" bgColor="#fff" @search="search" @change="search" @custom="search"
:searchIconSize="40" v-model="queryParams.title" height="75rpx" :showAction="false" :searchIconSize="40" v-model="queryParams.title" height="75rpx" :showAction="false"
actionText=" "></uv-search> actionText=" "></uv-search>
<text class="search-text" @click="search">搜索</text>
<text class="search-text" @tap="search">搜索</text>
</view> </view>
</view> </view>
@ -26,7 +26,7 @@
<!-- <view class="tabs"> <!-- <view class="tabs">
<uv-tabs :list="category" :activeStyle="{ color: '#f00', fontWeight: 600 }" lineColor="#f00" <uv-tabs :list="category" :activeStyle="{ color: '#f00', fontWeight: 600 }" lineColor="#f00"
:inactiveStyle="{ color: 'rgba(0,0,0,.8)' }" lineHeight="8rpx" lineWidth="50rpx" :current="current" :inactiveStyle="{ color: 'rgba(0,0,0,.8)' }" lineHeight="8rpx" lineWidth="50rpx" :current="current"
@click="clickTabs"></uv-tabs>
@tap="clickTabs"></uv-tabs>
</view> --> </view> -->
<uv-vtabs :list="category[2].children" :barStyle="{ <uv-vtabs :list="category[2].children" :barStyle="{
@ -49,7 +49,7 @@
<uv-vtabs-item> <uv-vtabs-item>
<view class="category-item"> <view class="category-item">
<productItem :item="pro" v-for="(pro, i) in categoryList.shopList" :key="i" <productItem :item="pro" v-for="(pro, i) in categoryList.shopList" :key="i"
@click="navigateToDetail(pro.id)" />
@tap="navigateToDetail(pro.id)" />
<uv-empty v-if="categoryList.shopList.length == 0" text="还没有呢" /> <uv-empty v-if="categoryList.shopList.length == 0" text="还没有呢" />
</view> </view>


+ 335
- 0
pages/index/center.vue View File

@ -0,0 +1,335 @@
<template>
<view class="center-page">
<!-- 顶部背景和个人信息 -->
<view class="header" :style="{ 'background-image': 'url(/static/image/红烧肉.png)' }">
<view class="user-info">
<image class="avatar" :src="userInfo.avatarUrl" mode="aspectFill"></image>
<view class="user-name-id">
<text class="user-name">{{ userInfo.nickName }}</text>
<text class="user-id">ID:{{ userInfo.userId }}</text>
</view>
</view>
<view class="role-switch-btn">
<uv-icon name="reload" size="30rpx" color="#fff" style="margin-right: 6rpx;" />
<text>切换为{{ userInfo.role }}</text>
</view>
</view>
<!-- 我的订单区域 -->
<view class="orders-section">
<view class="section-header">
<text class="section-title">我的订单</text>
<view class="view-all" @tap="navigateTo('/pages/index/order?status=all')">
<text>全部</text>
<uv-icon name="arrow-right" size="30rpx" color="#999" />
</view>
</view>
<view class="order-types">
<view class="order-type-item" @tap="navigateTo('/pages/index/order?status=pending')">
<view class="order-icon-wrapper">
<view class="green-circle">
<uv-icon name="red-packet" size="44rpx" color="#fff" />
</view>
<uv-badge max="9" absolute :offset="[-10, -12]" bgColor="#FF2A2A"
:value="userInfo.waitingPayCount" style="padding: 10rpx 15rpx;" />
</view>
<text class="order-type-text">待支付</text>
</view>
<view class="order-type-item" @tap="navigateTo('/pages/index/order?status=processing')">
<view class="order-icon-wrapper">
<view class="green-circle">
<uv-icon name="chat" size="44rpx" color="#fff" />
</view>
<uv-badge max="9" absolute :offset="[-10, -12]" bgColor="#FF2A2A"
:value="userInfo.waitingDiningCount" style="padding: 10rpx 15rpx;" />
</view>
<text class="order-type-text">待出餐</text>
</view>
<view class="order-type-item" @tap="navigateTo('/pages/index/order?status=shipping')">
<view class="order-icon-wrapper">
<view class="green-circle">
<uv-icon name="chat" size="44rpx" color="#fff" />
</view>
<uv-badge max="9" absolute :offset="[-10, -12]" bgColor="#FF2A2A"
:value="userInfo.deliveringCount" style="padding: 10rpx 15rpx;" />
</view>
<text class="order-type-text">送餐中</text>
</view>
<view class="order-type-item" @tap="navigateTo('/pages/index/order?status=delivered')">
<view class="order-icon-wrapper">
<view class="green-circle">
<uv-icon name="chat" size="44rpx" color="#fff" />
</view>
<uv-badge max="9" absolute :offset="[-10, -12]" bgColor="#FF2A2A" :value="userInfo.pickupCount"
style="padding: 10rpx 15rpx;" />
</view>
<text class="order-type-text">待取餐</text>
</view>
<view class="order-type-item" @tap="navigateTo('/pages/index/order?status=completed')">
<view class="order-icon-wrapper">
<view class="green-circle">
<uv-icon name="chat" size="44rpx" color="#fff" />
</view>
<uv-badge max="9" absolute :offset="[-10, -12]" bgColor="#FF2A2A"
:value="userInfo.completedCount" style="padding: 10rpx 15rpx;" />
</view>
<text class="order-type-text">已完成</text>
</view>
</view>
</view>
<!-- 团员功能区域 -->
<view class="member-functions">
<view class="section-header">
<text class="section-title">团员功能</text>
</view>
<view class="function-grid">
<view class="function-item" @tap="navigateTo('/pages_order/mine/updateUser')">
<view class="function-icon">
<uv-icon name="chat" size="94rpx" color="#019245" />
</view>
<text class="function-text">资料修改</text>
</view>
<view class="function-item" @tap="navigateTo('/pages_order/mine/team')">
<view class="function-icon">
<uv-icon name="chat" size="94rpx" color="#019245" />
</view>
<text class="function-text">团长申请</text>
</view>
<view class="function-item" @tap="navigateTo('/pages_order/mine/leader')">
<view class="function-icon">
<uv-icon name="chat" size="94rpx" color="#019245" />
</view>
<text class="function-text">解绑团长</text>
</view>
<view class="function-item" @tap="navigateTo('/pages_order/mine/share')">
<view class="function-icon">
<uv-icon name="chat" size="94rpx" color="#019245" />
</view>
<text class="function-text">推广链接</text>
</view>
<view class="function-item" @tap="navigateTo('/pages_order/mine/coupon')">
<view class="function-icon">
<uv-icon name="chat" size="94rpx" color="#019245" />
</view>
<text class="function-text">优惠券</text>
</view>
<view class="function-item" @tap="navigateTo('/pages_order/mine/wallet')">
<view class="function-icon">
<uv-icon name="chat" size="94rpx" color="#019245" />
</view>
<text class="function-text">钱包</text>
</view>
</view>
</view>
<tabber select="center" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mockUserInfo } from '@/static/js/mockUserInfo.js'
export default {
components: {
tabber
},
data() {
return {
userInfo: mockUserInfo
}
},
methods: {
navigateTo(url) {
console.log(111222);
this.$utils.navigateTo({
url
})
}
}
}
</script>
<style lang="scss" scoped>
.center-page {
min-height: 100vh;
background-color: #f5f5f5;
padding-bottom: 120rpx;
}
.header {
position: relative;
height: 340rpx;
background-size: cover;
background-position: center;
color: #fff;
padding: 60rpx 30rpx 0;
display: flex;
flex-direction: column;
align-items: start;
position: relative;
.user-info {
position: absolute;
display: flex;
align-items: center;
margin-top: 30rpx;
z-index: 2;
left: 30rpx;
top: 120rpx;
.avatar {
width: 110rpx;
height: 110rpx;
border-radius: 50%;
}
.user-name-id {
margin-left: 30rpx;
display: flex;
flex-direction: column;
.user-name {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 6rpx;
}
.user-id {
font-size: 24rpx;
opacity: 0.9;
}
}
}
.role-switch-btn {
position: absolute;
right: 0;
top: 180rpx;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 30rpx 0 0 30rpx;
padding: 10rpx 20rpx;
font-size: 24rpx;
z-index: 2;
display: flex;
align-items: center;
}
}
.orders-section {
background-color: #fff;
border-radius: 20rpx 20rpx 0 0;
margin: -70rpx auto 0;
padding: 15rpx;
position: relative;
z-index: 3;
width: 90%;
// margin: 0 auto;
}
.member-functions {
background-color: #fff;
padding: 30rpx;
margin-top: 20rpx;
width: 88%;
border-radius: 20rpx;
margin: 30rpx auto 0;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
.section-title {
font-size: 32rpx;
font-weight: 500;
position: relative;
padding-left: 15rpx;
}
.view-all {
display: flex;
align-items: center;
font-size: 26rpx;
color: $uni-color-third;
}
}
.order-types {
// background-color: red;
display: flex;
// justify-content: space-around;
.order-type-item {
display: flex;
flex-direction: column;
align-items: center;
width: 20%;
.order-icon-wrapper {
position: relative;
margin-bottom: 4rpx;
.green-circle {
width: 70rpx;
height: 70rpx;
background-color: $uni-color;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
}
.order-type-text {
font-size: 26rpx;
color: #666;
margin-top: 8rpx;
}
}
}
.function-grid {
display: flex;
flex-wrap: wrap;
.function-item {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 40rpx;
.function-icon {
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 16rpx;
}
.function-text {
font-size: 26rpx;
color: #333;
}
}
}
</style>

+ 4
- 4
pages/index/index.vue View File

@ -21,7 +21,7 @@
<uv-grid :border="false" :col="5"> <uv-grid :border="false" :col="5">
<uv-grid-item v-for="(item, index) in categoryList" <uv-grid-item v-for="(item, index) in categoryList"
:key="index" :key="index"
@click="$utils.navigateTo(`/pages/index/category?cid=${item.id}`)">
@tap="$utils.navigateTo(`/pages/index/category?cid=${item.id}`)">
<image :src="item.image" mode="aspectFill"></image> <image :src="item.image" mode="aspectFill"></image>
<text class="menu-text">{{item.name}}</text> <text class="menu-text">{{item.name}}</text>
</uv-grid-item> </uv-grid-item>
@ -41,7 +41,7 @@
</view> --> </view> -->
</view> </view>
<view class="new-perple-top-right" <view class="new-perple-top-right"
@click="$utils.navigateTo(`/pages_order/home/journalism`)">
@tap="$utils.navigateTo(`/pages_order/home/journalism`)">
<image :src="configList.index_model" mode="aspectFill"></image> <image :src="configList.index_model" mode="aspectFill"></image>
</view> </view>
</view> </view>
@ -52,7 +52,7 @@
</view> --> </view> -->
<view v-for="(item, index) in adList" :key="item.id" <view v-for="(item, index) in adList" :key="item.id"
@click="$utils.navigateTo(`/pages_order/home/newsDetail?id=${item.id}`)"
@tap="$utils.navigateTo(`/pages_order/home/newsDetail?id=${item.id}`)"
class="activity"> class="activity">
<image :src="item.icon" mode="aspectFill"></image> <image :src="item.icon" mode="aspectFill"></image>
<view class="title">{{ item.title }}</view> <view class="title">{{ item.title }}</view>
@ -83,7 +83,7 @@
<view class="line"></view> <view class="line"></view>
推荐宝贝 推荐宝贝
</view> </view>
<view @click="$utils.navigateTo('/pages/index/category')"
<view @tap="$utils.navigateTo('/pages/index/category')"
class="recommend-more">更多</view> class="recommend-more">更多</view>
</view> </view>


+ 2
- 2
pages/index/member.vue View File

@ -32,12 +32,12 @@
v-if="userInfo.isPay"> v-if="userInfo.isPay">
已成为会员 已成为会员
<text <text
@click="$utils.navigateTo('/pages/index/category')">去购买</text>
@tap="$utils.navigateTo('/pages/index/category')">去购买</text>
</view> </view>
<view class="submitOpen" <view class="submitOpen"
v-else v-else
@click="submitOpen">
@tap="submitOpen">
开通会员 开通会员
</view> </view>
</view> </view>


+ 33
- 22
pages/index/order.vue View File

@ -14,7 +14,7 @@
<view class="tabs"> <view class="tabs">
<uv-tabs :list="tabs" :activeStyle="{ color: '#019245'}" lineColor="#019245" :scrollable="false" <uv-tabs :list="tabs" :activeStyle="{ color: '#019245'}" lineColor="#019245" :scrollable="false"
:inactiveStyle="{color: 'black'}" lineHeight="6rpx" lineWidth="55rpx" :current="current" :inactiveStyle="{color: 'black'}" lineHeight="6rpx" lineWidth="55rpx" :current="current"
@click="clickTabs" />
@tap="clickTabs" />
</view> </view>
<!-- 团餐列表 --> <!-- 团餐列表 -->
@ -23,7 +23,7 @@
<view class="meal-name">{{ meal.name }}</view> <view class="meal-name">{{ meal.name }}</view>
<view class="meal-price">本单佣金合计: <text class="price-value">¥{{meal.price}}</text></view> <view class="meal-price">本单佣金合计: <text class="price-value">¥{{meal.price}}</text></view>
<view class="meal-action"> <view class="meal-action">
<button class="order-btn" @click="viewOrder(meal)">查看订单</button>
<button class="order-btn" @tap="viewOrder(meal)">查看订单</button>
</view> </view>
</view> </view>
</view> </view>
@ -31,7 +31,7 @@
<!-- 订单列表 --> <!-- 订单列表 -->
<view class="order-list" v-if="false"> <view class="order-list" v-if="false">
<OrderItem v-for="(order, index) in orderList" :key="order.id" :order="order" @cancel="handleCancelOrder" <OrderItem v-for="(order, index) in orderList" :key="order.id" :order="order" @cancel="handleCancelOrder"
@pay="handlePayOrder" @click="goToOrderDetail(order)" />
@pay="handlePayOrder" @tap="goToOrderDetail(order)" />
<view style=" <view style="
margin-top: 200rpx; margin-top: 200rpx;
min-width: 700rpx;"> min-width: 700rpx;">
@ -40,7 +40,7 @@
</view> </view>
<!-- <view class="list"> <!-- <view class="list">
<view class="item" v-for="(item, index) in list" @click="toOrderDetail(item.id)" :key="index">
<view class="item" v-for="(item, index) in list" @tap="toOrderDetail(item.id)" :key="index">
<view class="content" :key="index" v-for="(good, index) in item.commonOrderSkuList"> <view class="content" :key="index" v-for="(good, index) in item.commonOrderSkuList">
<view class="top"> <view class="top">
<view class="service"> <view class="service">
@ -80,19 +80,19 @@
<text class="c-unit"></text> <text class="c-unit"></text>
</view> </view>
<view @click.stop="toPayOrder(item)" class="btn" v-if="item.state == 0">
<view @tap.stop="toPayOrder(item)" class="btn" v-if="item.state == 0">
立即付款 立即付款
</view> </view>
<view @click.stop="cancelOrder(item)" class="btn" v-if="item.state == 0">
<view @tap.stop="cancelOrder(item)" class="btn" v-if="item.state == 0">
取消订单 取消订单
</view> </view>
<view class="btn" @click.stop="confirmOrder(item)" v-if="item.state == 2">
<view class="btn" @tap.stop="confirmOrder(item)" v-if="item.state == 2">
确认收货 确认收货
</view> </view>
<view @click.stop="$refs.customerServicePopup.open()" class="btn" v-if="item.state > 0">
<view @tap.stop="$refs.customerServicePopup.open()" class="btn" v-if="item.state > 0">
联系客服 联系客服
</view> </view>
</view> </view>
@ -148,6 +148,13 @@
name: '已完成' name: '已完成'
} }
], ],
statusMap: {
0: 'pending', //
1: 'processing', //
2: 'shipping', //
3: 'delivered', //
4: 'completed' //
},
current: 0, current: 0,
mixinsListApi: 'getOrderPageList', mixinsListApi: 'getOrderPageList',
orderList: [], orderList: [],
@ -155,11 +162,24 @@
} }
}, },
onLoad(args) { onLoad(args) {
this.current = args.type || 0
this.clickTabs({
index: this.current
})
// this.current = args.type || 0
// this.clickTabs({
// index: this.current
// })
if (args.status) {
// Map
for (const key in this.statusMap) {
if (this.statusMap[key] === args.status) {
this.current = Number(key)
break
}
}
this.clickTabs({
index: this.current
})
}
// //
this.loadMockOrders() this.loadMockOrders()
this.filterOrdersByStatus(this.current) this.filterOrdersByStatus(this.current)
@ -208,16 +228,7 @@
this.loadMockOrders() // this.loadMockOrders() //
// if (index === 0) return // // if (index === 0) return //
const statusMap = {
0: 'pending', //
1: 'processing', //
2: 'shipping', //
3: 'delivered', //
4: 'completed' //
}
const targetStatus = statusMap[index]
const targetStatus = this.statusMap[index]
if (targetStatus) { if (targetStatus) {
this.orderList = this.orderList.filter(order => order.status === targetStatus) this.orderList = this.orderList.filter(order => order.status === targetStatus)
this.groupMeals = this.groupMeals.filter(meal => meal.status === targetStatus) this.groupMeals = this.groupMeals.filter(meal => meal.status === targetStatus)


+ 4
- 4
pages_order/auth/wxLogin.vue View File

@ -16,7 +16,7 @@
<view class="btn mt" <view class="btn mt"
@click="wxLogin">
@tap="wxLogin">
<!-- <view class="icon"> <!-- <view class="icon">
<image src="../static/auth/wx.png" mode=""></image> <image src="../static/auth/wx.png" mode=""></image>
</view> --> </view> -->
@ -26,7 +26,7 @@
</view> </view>
<view class="btn b2" <view class="btn b2"
@click="qux">
@tap="qux">
取消登录 取消登录
@ -45,10 +45,10 @@
style="margin-top: 6rpx;" style="margin-top: 6rpx;"
></uv-checkbox> ></uv-checkbox>
<text class="text-privacy">阅读并同意我们的<text @click="$refs.popup.open('user_xy')">服务协议与隐私条款</text>以及<text @click="$refs.popup.open('user_ys')">个人信息保护指引</text></text>
<text class="text-privacy">阅读并同意我们的<text @tap="$refs.popup.open('user_xy')">服务协议与隐私条款</text>以及<text @tap="$refs.popup.open('user_ys')">个人信息保护指引</text></text>
</view> </view>
<!-- <view class=""> <!-- <view class="">
以及<text @click="$refs.popup.open('user_ys')">隐私政策</text>
以及<text @tap="$refs.popup.open('user_ys')">隐私政策</text>
</view> --> </view> -->
</view> </view>
</uv-checkbox-group> </uv-checkbox-group>


+ 1
- 1
pages_order/auth/wxUserInfo.vue View File

@ -57,7 +57,7 @@
<view class="btn" @click="submit">
<view class="btn" @tap="submit">
确认 确认
</view> </view>
</view> </view>


+ 3
- 3
pages_order/components/address/addressList.vue View File

@ -3,7 +3,7 @@
<uv-radio-group v-model="selectAddress" @change="editDefault" v-if="addressList.length > 0"> <uv-radio-group v-model="selectAddress" @change="editDefault" v-if="addressList.length > 0">
<view v-for="item in addressList" :key="item.id" class="address-item"> <view v-for="item in addressList" :key="item.id" class="address-item">
<view class="address-item-top" @click="select(item)">
<view class="address-item-top" @tap="select(item)">
<view class="img-box"> <view class="img-box">
<image src="../../static/address/icon.png" mode="aspectFill"></image> <image src="../../static/address/icon.png" mode="aspectFill"></image>
</view> </view>
@ -31,12 +31,12 @@
<view class="edit-btn"> <view class="edit-btn">
<uv-icon name="edit-pen"></uv-icon> <uv-icon name="edit-pen"></uv-icon>
<text @click="editAddress(item)" class="control-title">编辑</text>
<text @tap="editAddress(item)" class="control-title">编辑</text>
</view> </view>
<view class="del-btn"> <view class="del-btn">
<uv-icon name="trash"></uv-icon> <uv-icon name="trash"></uv-icon>
<text class="control-title" @click="deleteAddress(item.id)">删除</text>
<text class="control-title" @tap="deleteAddress(item.id)">删除</text>
</view> </view>
</view> </view>


+ 2
- 2
pages_order/location/pickupPoint.vue View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page"> <view class="page">
<!-- 导航栏 --> <!-- 导航栏 -->
<navbar title="取餐点" leftClick @leftClick="$utils.navigateBack" bgColor="#019245" color="#fff" />
<navbar title="取餐点" tap @tap="$utils.navigateBack" bgColor="#019245" color="#fff" />
<view class="container"> <view class="container">
<view class="header"> <view class="header">
@ -26,7 +26,7 @@
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<button class="select-btn" hover-class="select-btn-active" @click="selectPoint(item)">选择</button>
<button class="select-btn" hover-class="select-btn-active" @tap="selectPoint(item)">选择</button>
</view> </view>
</view> </view>
</view> </view>


+ 304
- 0
pages_order/mine/oldUpdateUser.vue View File

@ -0,0 +1,304 @@
<template>
<view class="login">
<view class="bg1"></view>
<view class="title">
定制自己的形象
</view>
<view v-if="back" @click="$utils.navigateBack" style="position: absolute;top: 120rpx;left: 20rpx;">
<uv-icon size="30rpx" color="#000" name="arrow-left"></uv-icon>
</view>
<button class="chooseAvatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image :src="form.headImage" mode="aspectFill"></image>
</button>
<input type="nickname" placeholder="给自己起一个响亮的名字" class="nickname" id="nickName" v-model="form.nickName" />
<!-- <view class="sexSelect">
<view
@click="sexClick(item)"
v-for="(item, index) in sexList"
:key="index"
:style="{color : form.sex == item.value ? item.actColor : '#333'}">
<uv-icon
size="30rpx"
:color="form.sex == item.value ? item.actColor : '#333'"
:name="item.icon"></uv-icon>
{{ item.value }}
</view>
</view> -->
<!-- <view class="address"
@click="$refs.datetimePicker.open()">
您出生于{{ $dayjs(form.yearDate).format("YYYY") }}
</view>
<view class="address"
@click="$refs.picker.open()">
{{ form.address || '请选择居住地址'}}
</view> -->
<uv-datetime-picker ref="datetimePicker" v-model="form.yearDate" mode="year" :minDate="minDate"
:maxDate="maxDate">
</uv-datetime-picker>
<uv-picker ref="picker" :columns="columns" keyName="name" @confirm="confirmAddress"></uv-picker>
<view class="btn" @click="submit">
确认
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
form: {
headImage: '',
nickName: '',
sex: '男',
yearDate: this.$dayjs().add(-18, 'y').valueOf(),//18
address: '',
},
maxDate: this.$dayjs().valueOf(),
minDate: this.$dayjs().add(-100, 'y').valueOf(),
sex: {
: {
name: 'man',
color: '#5baaff',
},
: {
name: 'woman',
color: '#ff50b3',
},
},
sexList: [
{
value: '男',
icon: 'man',
actColor: '#5baaff',
},
{
value: '女',
icon: 'woman',
actColor: '#ff50b3',
},
],
columns: [],
back: '',
};
},
computed: {
...mapState(['cityList', 'userInfo']),
},
onLoad({ back }) {
this.back = back
// this.$nextTick(() => {
// this.form.headImage = this.userInfo.headImage || this.form.headImage
// this.form.nickName = this.userInfo.nickName || this.form.nickName
// this.form.sex = this.userInfo.sex || this.form.sex
// this.form.yearDate = this.userInfo.yearDate || this.form.yearDate
// this.form.address = this.userInfo.address || this.form.address
// })
},
onShow() {
this.getCityList()
this.getUserInfo()
},
computed: {},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
.then(url => {
self.form.headImage = url
})
},
sexClick(item) {
this.form.sex = item.value
},
confirmAddress(e) {
this.form.address = e.value[0].name
},
//
getCityList() {
this.$api('getCityList', res => {
if (res.code == 200) {
this.columns = [
res.result
]
}
})
},
getUserInfo() {
this.$api('getInfo', res => {
if (res.code == 200) {
this.form.headImage = res.result.headImage || this.form.headImage
this.form.nickName = res.result.nickName || this.form.nickName
this.form.sex = res.result.sex || this.form.sex
this.form.yearDate = res.result.yearDate &&
this.$dayjs(res.result.yearDate + '-01-01').valueOf() || this.form.yearDate
this.form.address = res.result.address || this.form.address
}
})
},
submit() {
let self = this
uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.form.nickName = nickName
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称',
// address: '',
})) {
return
}
let data = {
...self.form,
// yearDate : this.$dayjs(self.form.yearDate).format("YYYY")
}
self.$api('updateInfo', data, res => {
if (res.code == 200) {
uni.reLaunch({
url: '/pages/index/index'
})
}
})
})
},
}
}
</script>
<style lang="scss" scoped>
.login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #fff;
overflow: hidden;
.bg1 {
width: 700rpx;
height: 700rpx;
border-radius: 50%;
background-color: #ffc0b333;
position: absolute;
right: -300rpx;
top: -300rpx;
}
.title {
line-height: 45rpx;
font-weight: 900;
padding-bottom: 100rpx;
font-size: 40rpx;
}
.chooseAvatar {
width: 100%;
padding: 0 !important;
margin: 0 !important;
border: none;
background-color: #fff !important;
width: 220rpx;
height: 220rpx;
border-radius: 50%;
image {
width: 200rpx;
height: 200rpx;
border-radius: 50%;
box-shadow: 0 0 10rpx 10rpx #00000012;
margin: 10rpx;
}
}
.chooseAvatar::after {
border: none;
padding: 0 !important;
margin: 0 !important;
}
.nickname {
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
}
.sexSelect {
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
display: flex;
align-items: center;
font-size: 26rpx;
line-height: 80rpx;
overflow: hidden;
&>view {
flex: 1;
display: flex;
justify-content: center;
align-content: center;
height: 100%;
}
&>view:nth-child(1) {
border-right: 1px solid #000;
}
}
.address {
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
line-height: 80rpx;
color: #555;
}
.btn {
// background: $uni-linear-gradient-btn-color;
background: $uni-color;
color: #fff;
width: 80%;
padding: 20rpx 0;
text-align: center;
border-radius: 15rpx;
margin-top: 10vh;
}
}
</style>

+ 335
- 0
pages_order/mine/team.vue View File

@ -0,0 +1,335 @@
<template>
<view class="page">
<!-- 导航栏 -->
<navbar title="团长申请" leftClick @leftClick="$utils.navigateBack" bgColor="#019245" color="#fff" />
<!-- 顶部图片区域 -->
<view class="banner">
<image src="/static/image/红烧肉.png" mode="aspectFill" class="banner-image"></image>
</view>
<view class="content-area">
<!-- 送餐点照片上传区域 -->
<view class="section-title">送餐点照片</view>
<view class="section-block">
<view class="upload-container">
<view class="upload-area" @click="chooseImage" v-if="!locationImage">
<view class="plus">+</view>
<view class="upload-text">添加图片</view>
</view>
<image v-else :src="locationImage" mode="aspectFill" class="upload-area" @click="chooseImage" />
</view>
</view>
<!-- 送餐点信息填写区域 -->
<view class="section-title">送餐点信息</view>
<view class="section-block">
<view class="form-item">
<text class="label">送餐点名称</text>
<input class="input" type="text" v-model="formData.name" placeholder="请输入送餐点名称"
placeholder-class="placeholder" />
</view>
<view class="form-item">
<text class="label">您的姓名</text>
<input class="input" type="text" v-model="formData.contactName" placeholder="请输入您的姓名"
placeholder-class="placeholder" />
</view>
<view class="form-item">
<text class="label">联系手机号</text>
<input class="input" type="number" v-model="formData.contactPhone" placeholder="请输入您的手机号"
placeholder-class="placeholder" />
</view>
<view class="form-item region-item" @click="showRegionPicker">
<text class="label">所在地区</text>
<view class="region-value">
<text :class="{ 'placeholder': !formData.region }" style="color: #000;">{{ formData.region || '请选择' }}</text>
<uv-icon name="arrow-right" color="#000" />
</view>
</view>
<view class="address-item">
<text class="label">详细地址</text>
<view class="address-box">
<textarea class="address-input" v-model="formData.address" placeholder="请输入详细地址"
placeholder-class="placeholder" />
</view>
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-btn" @click="submitApplication">
提交申请
</view>
</view>
</view>
</template>
<script>
import navbar from '@/components/base/navbar.vue'
export default {
components: {
navbar
},
data() {
return {
locationImage: '', //
formData: {
name: '', //
contactName: '', //
contactPhone: '', //
region: '', //
address: '' //
}
}
},
methods: {
//
chooseImage() {
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
//
//
this.locationImage = res.tempFilePaths[0]
}
})
},
//
showRegionPicker() {
//
this.formData.region = '长沙市雨花区'
//
uni.showToast({
title: '已选择地区',
icon: 'none'
})
},
//
submitApplication() {
//
if (!this.locationImage) {
return uni.showToast({
title: '请上传送餐点照片',
icon: 'none'
})
}
if (!this.formData.name) {
return uni.showToast({
title: '请输入送餐点名称',
icon: 'none'
})
}
if (!this.formData.contactName) {
return uni.showToast({
title: '请输入您的姓名',
icon: 'none'
})
}
if (!this.formData.contactPhone) {
return uni.showToast({
title: '请输入联系手机号',
icon: 'none'
})
}
if (!this.$utils.verificationPhone(this.formData.contactPhone)) {
return uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
}
if (!this.formData.region) {
return uni.showToast({
title: '请选择所在地区',
icon: 'none'
})
}
if (!this.formData.address) {
return uni.showToast({
title: '请输入详细地址',
icon: 'none'
})
}
//
uni.showLoading({
title: '提交中...'
})
//
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '申请提交成功',
icon: 'success'
})
//
setTimeout(() => {
this.$utils.navigateBack()
}, 1500)
}, 1000)
}
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #f5f5f5;
min-height: 100vh;
}
.banner {
width: 100%;
height: 240rpx;
background-color: #019245;
.banner-image {
width: 100%;
height: 100%;
display: block;
}
}
.content-area {
padding: 20rpx;
}
.section-block {
margin-bottom: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 10rpx 20rpx;
overflow: hidden;
}
.section-title {
font-size: 28rpx;
color: #333;
padding: 20rpx;
// border-bottom: 1rpx solid #f5f5f5;
}
.upload-container {
padding: 20rpx;
min-height: 140rpx;
}
.upload-area {
width: 150rpx;
height: 150rpx;
border: 3rpx dashed $uni-color;
// border-radius: 8rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.plus {
font-size: 80rpx;
color: $uni-color;
line-height: 1;
// margin-bottom: 5rpx;
font-weight: 100;
}
.upload-text {
font-size: 24rpx;
color: $uni-color-third;
}
}
.form-item {
padding: 24rpx 0;
display: flex;
align-items: center;
border-bottom: 2rpx solid #C7C7C7;
&:last-child {
border-bottom: none;
}
}
.label {
flex: 3;
font-size: 28rpx;
color: #333;
padding-left: 10rpx;
}
.input {
flex: 2;
font-size: 28rpx;
// height: 60rpx;
text-align: left;
}
.placeholder,
.region-item .region-value text.placeholder {
// height: 60rpx;
color: #999;
}
.region-item {
cursor: pointer;
.region-value {
flex: 1;
text-align: right;
font-size: 28rpx;
display: flex;
justify-content: flex-end;
align-items: center;
}
}
.address-item {
padding: 24rpx 0;
display: flex;
flex-direction: column;
gap: 20rpx;
.address-box {
}
.address-input {
padding: 20rpx;
background-color: #F5F5F5;
border-radius: 10rpx;
width: inherit;
height: 60rpx;
font-size: 28rpx;
}
}
.submit-btn {
width: 80%;
margin: 40rpx auto 0;
height: 100rpx;
background-color: $uni-color;
color: #fff;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50rpx;
// margin-top: 60rpx;
}
</style>

+ 247
- 284
pages_order/mine/updateUser.vue View File

@ -1,319 +1,282 @@
<template> <template>
<view class="login">
<view class="bg1"></view>
<view class="title">
定制自己的形象
</view>
<view
v-if="back"
@click="$utils.navigateBack"
style="position: absolute;top: 120rpx;left: 20rpx;">
<uv-icon
size="30rpx"
color="#000"
name="arrow-left"></uv-icon>
</view>
<button class="chooseAvatar"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar">
<image :src="form.headImage"
mode="aspectFill"></image>
</button>
<input type="nickname"
placeholder="给自己起一个响亮的名字"
class="nickname" id="nickName"
v-model="form.nickName" />
<!-- <view class="sexSelect">
<view
@click="sexClick(item)"
v-for="(item, index) in sexList"
:key="index"
:style="{color : form.sex == item.value ? item.actColor : '#333'}">
<uv-icon
size="30rpx"
:color="form.sex == item.value ? item.actColor : '#333'"
:name="item.icon"></uv-icon>
{{ item.value }}
<view class="profile-page">
<!-- 头部导航栏 -->
<navbar title="资料修改" bgColor="#019245" color="#fff" leftClick @leftClick="$utils.navigateBack" />
<!-- 基本资料区域 -->
<view class="main-content">
<view class="section-title">
<view class="title-indicator"></view>
<text>基本资料</text>
</view>
<!-- 头像选择区域 -->
<view class="avatar-section">
<button class="chooseAvatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="avatar-img" :src="form.headImage" mode="aspectFill"></image>
</button>
<text class="avatar-hint">点击更换头像</text>
</view>
<!-- 表单区域 -->
<view class="form-section">
<view class="form-item">
<text class="label">昵称</text>
<input class="input" type="nickname" placeholder="请输入" v-model="form.nickName" id="nickName"
placeholderStyle="color: #999; text-align: right;" />
</view>
<view class="form-item">
<text class="label">手机号</text>
<input class="input" type="tel" placeholder="请输入" v-model="form.phone"
placeholderStyle="color: #999; text-align: right;" />
</view>
</view>
<!-- 保存按钮 -->
<view class="save-button" @tap="submit">
<text>保存</text>
</view> </view>
</view> -->
<!-- <view class="address"
@click="$refs.datetimePicker.open()">
您出生于{{ $dayjs(form.yearDate).format("YYYY") }}
</view>
<view class="address"
@click="$refs.picker.open()">
{{ form.address || '请选择居住地址'}}
</view> -->
<uv-datetime-picker
ref="datetimePicker"
v-model="form.yearDate"
mode="year"
:minDate="minDate"
:maxDate="maxDate">
</uv-datetime-picker>
<uv-picker ref="picker"
:columns="columns"
keyName="name"
@confirm="confirmAddress"></uv-picker>
<view class="btn" @click="submit">
确认
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default {
data() {
return {
form: {
headImage: '',
nickName: '',
sex : '男',
yearDate : this.$dayjs().add(-18, 'y').valueOf(),//18
address : '',
},
maxDate : this.$dayjs().valueOf(),
minDate : this.$dayjs().add(-100, 'y').valueOf(),
sex : {
: {
name : 'man',
color : '#5baaff',
},
: {
name : 'woman',
color : '#ff50b3',
},
},
sexList : [
{
value : '男',
icon : 'man',
actColor : '#5baaff',
},
{
value : '女',
icon : 'woman',
actColor : '#ff50b3',
},
],
columns : [],
back : '',
};
},
computed: {
...mapState(['cityList', 'userInfo']),
},
onLoad({back}) {
this.back = back
// this.$nextTick(() => {
// this.form.headImage = this.userInfo.headImage || this.form.headImage
// this.form.nickName = this.userInfo.nickName || this.form.nickName
// this.form.sex = this.userInfo.sex || this.form.sex
// this.form.yearDate = this.userInfo.yearDate || this.form.yearDate
// this.form.address = this.userInfo.address || this.form.address
// })
},
onShow() {
this.getCityList()
this.getUserInfo()
},
computed: {},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
import { mapState } from 'vuex'
import { mockUserInfo } from '@/static/js/mockUserInfo.js'
import navbar from '@/components/base/navbar.vue'
export default {
components: {
navbar
},
data() {
return {
form: {
headImage: '',
nickName: '',
phone: ''
},
back: '',
}
},
computed: {
...mapState(['userInfo']),
},
onLoad({ back }) {
this.back = back
},
onShow() {
this.getUserInfo()
},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.detail.avatarUrl)
.then(url => { .then(url => {
self.form.headImage = url self.form.headImage = url
}) })
},
sexClick(item){
this.form.sex = item.value
},
confirmAddress(e){
this.form.address = e.value[0].name
},
//
getCityList(){
this.$api('getCityList', res => {
if(res.code == 200){
this.columns = [
res.result
]
}
},
getUserInfo() {
// 使mock
this.form.headImage = mockUserInfo.avatarUrl || this.form.headImage
this.form.nickName = mockUserInfo.nickName || this.form.nickName
this.form.phone = '13800138000' //
},
submit() {
let self = this
// dominput v-model
uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
}) })
},
getUserInfo(){
this.$api('getInfo', res => {
if(res.code == 200){
this.form.headImage = res.result.headImage || this.form.headImage
this.form.nickName = res.result.nickName || this.form.nickName
this.form.sex = res.result.sex || this.form.sex
this.form.yearDate = res.result.yearDate &&
this.$dayjs(res.result.yearDate + '-01-01').valueOf() || this.form.yearDate
this.form.address = res.result.address || this.form.address
.exec((res) => {
const nickName = res?.[0]?.value
self.form.nickName = nickName
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称',
phone: '请填写手机号'
})) {
return
} }
})
},
submit() {
let self = this
uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.form.nickName = nickName
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称',
// address: '',
})) {
return
}
let data = {
...self.form,
// yearDate : this.$dayjs(self.form.yearDate).format("YYYY")
}
self.$api('updateInfo', data, res => {
if (res.code == 200) {
uni.reLaunch({
url:'/pages/index/index'
})
}
if (!self.$utils.verificationPhone(self.form.phone)) {
uni.showToast({
icon: 'none',
title: '请填写正确的手机号'
}) })
return
}
uni.showLoading({
title: '保存中...'
}) })
},
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '保存成功',
icon: 'success'
})
//
setTimeout(() => {
this.$utils.navigateBack()
}, 1500)
}, 1000)
})
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.login {
.profile-page {
min-height: 100vh;
background-color: #f5f5f5;
}
.nav-bar {
height: 180rpx;
background-color: #019245;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
padding-top: 60rpx;
box-sizing: border-box;
color: #fff;
.back-btn {
width: 60rpx;
height: 60rpx;
display: flex; display: flex;
flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
height: 100vh;
background-color: #fff;
overflow: hidden;
.bg1{
width: 700rpx;
height: 700rpx;
border-radius: 50%;
background-color: #ffc0b333;
position: absolute;
right: -300rpx;
top: -300rpx;
}
.nav-title {
font-size: 36rpx;
font-weight: 500;
}
.right-actions {
display: flex;
align-items: center;
.icon-divider {
width: 2rpx;
height: 30rpx;
background-color: rgba(255, 255, 255, 0.5);
margin: 0 20rpx;
} }
}
}
.main-content {
padding: 30rpx;
}
.section-title {
display: flex;
align-items: center;
margin-bottom: 30rpx;
.title-indicator {
width: 8rpx;
height: 32rpx;
background-color: $uni-color;
margin-right: 15rpx;
border-radius: 4rpx;
}
text {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
}
.title {
line-height: 45rpx;
font-weight: 900;
padding-bottom: 100rpx;
font-size: 40rpx;
.avatar-section {
display: flex;
flex-direction: column;
align-items: center;
margin: 50rpx 0;
.chooseAvatar {
width: 180rpx;
height: 180rpx;
border-radius: 50%;
overflow: hidden;
padding: 0;
margin: 0;
background: none;
&::after {
border: none;
} }
.chooseAvatar {
.avatar-img {
width: 100%; width: 100%;
padding: 0 !important;
margin: 0 !important;
border: none;
background-color: #fff !important;
width: 220rpx;
height: 220rpx;
height: 100%;
border-radius: 50%; border-radius: 50%;
image{
width: 200rpx;
height: 200rpx;
border-radius: 50%;
box-shadow: 0 0 10rpx 10rpx #00000012;
margin: 10rpx;
}
} }
.chooseAvatar::after{
border: none;
padding: 0 !important;
margin: 0 !important;
}
.nickname{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
}
.sexSelect{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
display: flex;
align-items: center;
font-size: 26rpx;
line-height: 80rpx;
overflow: hidden;
&>view{
flex: 1;
display: flex;
justify-content: center;
align-content: center;
height: 100%;
}
&>view:nth-child(1){
border-right: 1px solid #000;
}
}
.avatar-hint {
font-size: 26rpx;
color: $uni-color-third;
margin-top: 20rpx;
}
}
.form-section {
background-color: #fff;
border-radius: 30rpx;
overflow: hidden;
margin-bottom: 60rpx;
.form-item {
display: flex;
height: 100rpx;
align-items: center;
padding: 0 30rpx;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: none;
} }
.address{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
line-height: 80rpx;
color: #555;
.label {
width: 150rpx;
font-size: 30rpx;
color: $uni-color-third;
} }
.btn {
// background: $uni-linear-gradient-btn-color;
background: $uni-color;
color: #fff;
width: 80%;
padding: 20rpx 0;
text-align: center;
border-radius: 15rpx;
margin-top: 10vh;
.input {
flex: 1;
height: 100%;
font-size: 30rpx;
color: #666;
} }
} }
}
.save-button {
width: 90%;
margin: 160rpx auto 0;
height: 100rpx;
background-color: $uni-color;
border-radius: 45rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 32rpx;
box-shadow: 0 6rpx 20rpx rgba(1, 146, 69, 0.3);
}
</style> </style>

+ 3
- 3
pages_order/order/afterSale.vue View File

@ -27,12 +27,12 @@
<view class="image-grid"> <view class="image-grid">
<view class="image-item" v-for="(image, index) in uploadedImages" :key="'img-'+index"> <view class="image-item" v-for="(image, index) in uploadedImages" :key="'img-'+index">
<image :src="image" mode="aspectFill" class="preview-image"></image> <image :src="image" mode="aspectFill" class="preview-image"></image>
<view class="delete-icon" @click="deleteImage(index)">
<view class="delete-icon" @tap="deleteImage(index)">
<uv-icon name="close" color="#fff" size="24rpx"></uv-icon> <uv-icon name="close" color="#fff" size="24rpx"></uv-icon>
</view> </view>
</view> </view>
<view class="upload-button" @click="chooseImage" v-if="uploadedImages.length < 9">
<view class="upload-button" @tap="chooseImage" v-if="uploadedImages.length < 9">
<uv-icon name="plus" size="60rpx" color="#019245"></uv-icon> <uv-icon name="plus" size="60rpx" color="#019245"></uv-icon>
<text>添加图片</text> <text>添加图片</text>
</view> </view>
@ -53,7 +53,7 @@
</view> </view>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<view class="submit-button" @click="submitAfterSale">
<view class="submit-button" @tap="submitAfterSale">
提交 提交
</view> </view>
</view> </view>


+ 3
- 3
pages_order/order/newOrderDetail.vue View File

@ -42,7 +42,7 @@
<text class="food-count">×{{food.count}}</text> <text class="food-count">×{{food.count}}</text>
</view> </view>
</view> </view>
<view class="expand-more" @click="showAllFoods = !showAllFoods" v-if="orderDetail.foods.length > 3">
<view class="expand-more" @tap="showAllFoods = !showAllFoods" v-if="orderDetail.foods.length > 3">
<text>{{showAllFoods ? '收起' : '展开'}} ({{orderDetail.foodCount}})</text> <text>{{showAllFoods ? '收起' : '展开'}} ({{orderDetail.foodCount}})</text>
<uv-icon :name="showAllFoods ? 'arrow-up' : 'arrow-down'" size="28rpx"></uv-icon> <uv-icon :name="showAllFoods ? 'arrow-up' : 'arrow-down'" size="28rpx"></uv-icon>
</view> </view>
@ -115,8 +115,8 @@
<text class="total-label">{{orderDetail.foodCount}}<text style="color: black;">合计</text> </text> <text class="total-label">{{orderDetail.foodCount}}<text style="color: black;">合计</text> </text>
<text class="total-price">{{(orderDetail.totalPrice - 2).toFixed(1)}}</text> <text class="total-price">{{(orderDetail.totalPrice - 2).toFixed(1)}}</text>
</view> </view>
<view class="pay-button" @click="handlePay" v-if="orderStatus === 'pending'">立即下单</view>
<view class="pay-button" @click="handlePay" v-if="orderStatus === 'delivered'">立即取餐</view>
<view class="pay-button" @tap="handlePay" v-if="orderStatus === 'pending'">立即下单</view>
<view class="pay-button" @tap="handlePay" v-if="orderStatus === 'delivered'">立即取餐</view>
</view> </view>
</view> </view>
</template> </template>


+ 3
- 3
pages_order/order/orderDetail.vue View File

@ -117,7 +117,7 @@
</view> </view>
</view> </view>
</view> </view>
<view @click="gototechnicianDetail(msgTechnician)" class="btn-x">
<view @tap="gototechnicianDetail(msgTechnician)" class="btn-x">
服务技师 服务技师
</view> </view>
</view> --> </view> -->
@ -126,11 +126,11 @@
<view class="addressDetail"> <view class="addressDetail">
<view class="address-line"> <view class="address-line">
<view class="main">{{order.name}} {{order.phone}}</view> <view class="main">{{order.name}} {{order.phone}}</view>
<view @click="copy(order.name + ' ' + order.phone)" class="copy">复制</view>
<view @tap="copy(order.name + ' ' + order.phone)" class="copy">复制</view>
</view> </view>
<view class="address-line"> <view class="address-line">
<view class="main">{{order.address}} {{order.addressDetails}}</view> <view class="main">{{order.address}} {{order.addressDetails}}</view>
<view @click="copy(order.address + ' ' + order.addressDetails)" class="copy">复制</view>
<view @tap="copy(order.address + ' ' + order.addressDetails)" class="copy">复制</view>
</view> </view>
</view> </view>
</view> </view>


+ 11
- 0
static/js/mockUserInfo.js View File

@ -0,0 +1,11 @@
export const mockUserInfo = {
avatarUrl: "/static/image/中森明菜.webp",
nickName: "李向西",
userId: "123456",
role: "团长",
waitingPayCount: 2,
waitingDiningCount: 0,
deliveringCount: 3,
pickupCount: 0,
completedCount: 0
}

Loading…
Cancel
Save