Browse Source

上传修改

master
前端-胡立永 4 months ago
parent
commit
cd090aaaa7
31 changed files with 92 additions and 1057 deletions
  1. +1
    -1
      README.md
  2. +8
    -16
      components/base/tabbar.vue
  3. BIN
      doc/home.png
  4. +2
    -8
      pages.json
  5. +0
    -259
      pages/index/cart.vue
  6. +0
    -181
      pages/index/category.vue
  7. +44
    -0
      pages/index/consult.vue
  8. +0
    -326
      pages/index/index.vue
  9. +34
    -0
      pages/index/keepAccounts.vue
  10. +0
    -263
      pages/index/order.vue
  11. BIN
      static/image/home/0.png
  12. BIN
      static/image/home/1.png
  13. BIN
      static/image/home/2.png
  14. BIN
      static/image/home/3.png
  15. BIN
      static/image/home/4.png
  16. BIN
      static/image/home/5.png
  17. BIN
      static/image/home/address-icon.png
  18. BIN
      static/image/home/arrow-icon.png
  19. BIN
      static/image/home/c.png
  20. BIN
      static/image/home/phone.png
  21. BIN
      static/image/home/search-icon.png
  22. BIN
      static/image/tabbar/cart-a.png
  23. BIN
      static/image/tabbar/cart.png
  24. BIN
      static/image/tabbar/category-a.png
  25. BIN
      static/image/tabbar/category.png
  26. BIN
      static/image/tabbar/center-a.png
  27. BIN
      static/image/tabbar/home-a.png
  28. BIN
      static/image/tabbar/home.png
  29. BIN
      static/image/tabbar/order-a.png
  30. +1
    -1
      uni.scss
  31. +2
    -2
      utils/position.js

+ 1
- 1
README.md View File

@ -1,4 +1,4 @@
#酒店桌布小程序
#招聘小程序
![](./doc/home.png) ![](./doc/home.png)
![](./doc/home-s.png) ![](./doc/home-s.png)


+ 8
- 16
components/base/tabbar.vue View File

@ -36,33 +36,25 @@
"selectedIconPath": "/static/image/tabbar/home-a.png", "selectedIconPath": "/static/image/tabbar/home-a.png",
"iconPath": "/static/image/tabbar/home.png", "iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index", "pagePath": "/pages/index/index",
"title": "首页"
},
{
"selectedIconPath": "/static/image/tabbar/category-a.png",
"iconPath": "/static/image/tabbar/category.png",
"pagePath": "/pages/index/category",
"title": "分类",
isNotShop : true,
"title": "找工作"
}, },
{ {
"selectedIconPath": "/static/image/tabbar/order-a.png", "selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png", "iconPath": "/static/image/tabbar/order.png",
"pagePath": "/pages/index/order",
"title": "订单中心"
"pagePath": "/pages/index/keepAccounts",
"title": "记工记账"
}, },
{ {
"selectedIconPath": "/static/image/tabbar/cart-a.png",
"iconPath": "/static/image/tabbar/cart.png",
"pagePath": "/pages/index/cart",
"title": "购物车",
isNotShop : true,
"selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png",
"pagePath": "/pages/index/consult",
"title": "考证咨询",
}, },
{ {
"selectedIconPath": "/static/image/tabbar/center-a.png", "selectedIconPath": "/static/image/tabbar/center-a.png",
"iconPath": "/static/image/tabbar/center.png", "iconPath": "/static/image/tabbar/center.png",
"pagePath": "/pages/index/center", "pagePath": "/pages/index/center",
"title": "个人中心"
"title": "会员中心"
} }
] ]
}; };


BIN
doc/home.png View File

Before After
Width: 586  |  Height: 1276  |  Size: 271 KiB Width: 1708  |  Height: 903  |  Size: 458 KiB

+ 2
- 8
pages.json View File

@ -6,13 +6,13 @@
} }
}, },
{ {
"path": "pages/index/order",
"path": "pages/index/consult",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
{ {
"path": "pages/index/category",
"path": "pages/index/keepAccounts",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
@ -22,12 +22,6 @@
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
},
{
"path": "pages/index/cart",
"style": {
"navigationBarTitleText": ""
}
} }
], ],
"preloadRule": { "preloadRule": {


+ 0
- 259
pages/index/cart.vue View File

@ -1,259 +0,0 @@
<template>
<view class="page">
<navbar/>
<view class="user">
<uv-checkbox-group
shape="circle"
v-model="checkboxValue">
<uv-swipe-action>
<view
v-for="(item, index) in list"
:key="index">
<view style="margin-top: 20rpx;"></view>
<uv-swipe-action-item
:options="options">
<view class="item">
<view class="checkbox">
<uv-checkbox
:name="item.id"
activeColor="#FA5A0A"
size="40rpx"
icon-size="35rpx"
></uv-checkbox>
</view>
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
mode=""></image>
<view class="info">
<view class="title">
<view class="">
{{ item.title }}
</view>
<view class="">
<uv-number-box v-model="item.num"
@change="valChange"></uv-number-box>
</view>
</view>
<view class="unit">
规格{{ item.unit }}
<uv-icon name="arrow-down"></uv-icon>
</view>
<view class="price">
<text>{{ item.price }}</text>
</view>
</view>
</view>
</uv-swipe-action-item>
</view>
</uv-swipe-action>
</uv-checkbox-group>
<view class="action">
<view class="icon">
<image src="/static/image/cart/1.png" mode=""></image>
<view class="num">
{{ checkboxValue.length }}
</view>
</view>
<view class="price">
<view class="count">
合计
<view class="">
<text>{{ totalPrice }}</text>
</view>
</view>
<view class="text">
{{ checkboxValue.length }}已享受更低优惠
</view>
</view>
<view class="btn">
去结算
</view>
</view>
</view>
<tabber select="3" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components: {
tabber,
},
data() {
return {
value : 0,
checkboxValue : [],
options: [
{
text: '删除',
style: {
backgroundColor: '#FA5A0A'
}
},
],
list : [
{
id : 1,
title : '桌布租赁',
num : 1,
price : 299,
unit : '120*40*75【桌子尺寸】',
},
{
id : 2,
title : '桌布租赁',
num : 1,
price : 299,
unit : '120*40*75【桌子尺寸】',
},
],
}
},
computed: {
totalPrice(){
if (!this.checkboxValue.length) {
return 0
}
let price = 0
this.list.forEach(n => {
if(this.checkboxValue.includes(n.id)){
price += n.price * n.num
}
})
return price
},
},
methods: {
valChange(){
},
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 200rpx;
/deep/ .uv-swipe-action{
width: 100%;
}
}
.user {
.item{
background-color: #fff;
display: flex;
padding: 30rpx;
.checkbox{
display: flex;
justify-content: center;
align-items: center;
}
.image{
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
}
.info{
flex: 1;
.title{
display: flex;
padding: 10rpx 20rpx;
justify-content: space-between;
}
.unit{
font-size: 24rpx;
padding: 10rpx 20rpx;
color: #717171;
display: flex;
align-items: center;
}
.price{
color: $uni-color;
font-size: 28rpx;
padding: 10rpx 20rpx;
text{
font-size: 36rpx;
font-weight: 900;
}
}
}
}
.action{
width: 700rpx;
position: fixed;
bottom: 220rpx;
left: 25rpx;
background-color: #fff;
height: 100rpx;
border-radius: 50rpx;
box-shadow: 0 0 6rpx 6rpx #00000010;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
.icon{
position: relative;
width: 80rpx;
height: 80rpx;
margin: 0 20rpx;
image{
width: 80rpx;
height: 80rpx;
}
.num{
position: absolute;
right: 10rpx;
top: 0rpx;
background-color: $uni-color;
color: #fff;
font-size: 18rpx;
border-radius: 50%;
height: 30rpx;
width: 30rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
.price{
.count{
display: flex;
font-size: 26rpx;
align-items: center;
view{
color: $uni-color;
margin-left: 10rpx;
text{
font-size: 32rpx;
font-weight: 900;
}
}
}
.text{
font-size: 20rpx;
color: #717171;
}
}
.btn{
margin-left: auto;
background-color: $uni-color;
height: 100%;
padding: 0 50rpx;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

+ 0
- 181
pages/index/category.vue View File

@ -1,181 +0,0 @@
<template>
<view class="page">
<navbar/>
<view class="category">
<uv-vtabs
:chain="chain"
:list="category"
height="1000px"
:barItemBadgeStyle="{right:'20px',top:'12px'}"
@change="change">
<uv-vtabs-item>
<view class="category-title">
租赁
</view>
<view class="list">
<view class="item" v-for="(item,index) in list" :key="index"
@click="$utils.navigateTo('/pages_order/product/productDetail?id=123')">
<view class="item-image">
<image
:src="item.image"
mode="aspectFill"></image>
</view>
<view class="item-unit">
<text class="text">{{item.unit}}</text>
</view>
</view>
</view>
</uv-vtabs-item>
</uv-vtabs>
</view>
<tabber select="1" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components: {
tabber,
},
data() {
return {
category: [
{
name : '桌布'
},
{
name : '桌布'
},
{
name : '桌布'
},
],
list : [
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
],
chain: false,
value: 0
}
},
computed: {
list2() {
const _list = this.list[this.value]?.childrens;
return _list ? _list : [];
}
},
onReady() {
},
methods: {
change(index) {
console.log('选项改变:', index)
this.value = index;
}
}
}
</script>
<style scoped lang="scss">
.category {
font-size: 30rpx;
color: #333;
min-height: 100vh;
.category-title{
position: relative;
display: flex;
justify-content: center;
align-items: center;
height: 120rpx;
&::before,
&::after {
position: absolute;
top: 50%;
content: '';
width: 10%;
border-top: 2rpx solid black;
}
&::before {
left: 25%;
}
&::after {
right: 25%;
}
}
.list{
display: flex;
flex-wrap: wrap;
margin: 0 auto;
width: 490rpx;
.item {
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 20rpx;
.item-image {
width: 120rpx;
height: 120rpx;
image{
height: 100%;
width: 100%;
border-radius: 50%;
}
}
.item-unit {
font-size: 24rpx;
margin-top: 15rpx;
color: #555;
}
}
.gap {
padding: 0 30rpx;
}
}
}
</style>

+ 44
- 0
pages/index/consult.vue View File

@ -0,0 +1,44 @@
<template>
<view class="page">
<navbar
title="订单中心"
/>
<tabber select="2"/>
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mapGetters } from 'vuex'
export default {
components : {
tabber,
},
computed : {
...mapGetters(['userShop']),
},
data() {
return {
}
},
onShow() {
},
//
onReachBottom() {
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
}
</style>

+ 0
- 326
pages/index/index.vue View File

@ -1,112 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<navbar/>
<view class="search">
<view @click="showSelectArea" class="left-area">
<image src="@/static/image/home/address-icon.png"></image>
<view class="area">{{ area }}</view>
<image src="@/static/image/home/arrow-icon.png" mode="aspectFit"></image>
<view class="parting-line">|</view>
</view>
<view class="center-area">
<image
style="margin-right: 20rpx;"
src="@/static/image/home/search-icon.png"></image>
<input v-model="queryParams.title"
placeholder="桌布租赁" />
</view>
<!-- <view class="right-area">
<view @click="searchAddress" class="search-button">
搜索
</view>
</view> -->
</view>
<view class="swipe">
<uv-swiper
:list="bannerList"
indicator
height="320rpx"
keyName="url"></uv-swiper>
</view>
<!-- 水洗店 -->
<view class="userShop"
v-if="userShop">
<view class="list">
<view class="item"
v-for="(item, index) in 4"
:key="index">
<view class="">
<view class="">
我的客户
</view>
<view class="num">
{{ 30 }}
</view>
</view>
<view class="">
<image :src="`/static/image/home/${index}.png`" mode=""></image>
</view>
</view>
</view>
</view>
<!-- 酒店 -->
<view class="user"
v-else>
<uv-notice-bar
fontSize="28rpx"
:text="text"></uv-notice-bar>
<view class="shop">
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
mode=""></image>
<view class="shopInfo">
<view class="title">
HOUS水洗店
</view>
<view class="tags">
<view class="tag">
桌布水洗
</view>
<view class="tag">
桌布租赁
</view>
</view>
<view class="time">
9:00-18:00
</view>
<view class="address">
长沙市天心区桂花坪街道231号
</view>
</view>
<view class="btns">
<view class="btn"
@click="$utils.navigateTo('/pages_order/auth/wxUserInfo')">
我要水洗
</view>
</view>
<view class="tips">
关联门店主信门店
</view>
</view>
<view class="productList">
<productList/>
</view>
</view>
<!-- <selectArea ref="selectArea" @close="closeAreaPro" @select="selectArea"></selectArea> -->
<PrivacyAgreementPoup/> <PrivacyAgreementPoup/>
@ -118,24 +12,15 @@
import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue' import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue'
import Position from '@/utils/position.js' import Position from '@/utils/position.js'
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import productList from '@/components/user/productList.vue'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
// import selectArea from '../../components/selectArea.vue'; // import selectArea from '../../components/selectArea.vue';
export default { export default {
components : { components : {
tabber, tabber,
productList,
PrivacyAgreementPoup, PrivacyAgreementPoup,
}, },
data() { data() {
return { return {
area: '长沙',
text : '长沙市刘师傅在服务过程中客户投诉“服务过程中有不文明的行为”.....',
queryParams: {
pageNo: 1,
pageSize: 10,
title: ''
},
bannerList: [ bannerList: [
{ {
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png', url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
@ -147,7 +32,6 @@
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png', url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
}, },
], ],
productList: [],
} }
}, },
computed : { computed : {
@ -198,215 +82,5 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.search {
height: 82rpx;
width: 710rpx;
background: #FFFFFF;
margin: 20rpx auto;
border-radius: 41rpx;
box-sizing: border-box;
padding: 0 15rpx;
display: flex;
align-items: center;
// justify-content: space-between;
.left-area,
.center-area {
display: flex;
align-items: center;
}
.left-area {
max-width: 160rpx;
image {
flex-shrink: 0;
width: 26rpx;
height: 26rpx;
}
.area {
font-size: 24rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制显示两行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
color: #292929;
}
.parting-line {
flex-shrink: 0;
font-size: 26rpx;
color: #ccc;
margin: 0rpx 5rpx;
}
}
.center-area {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: calc(100% - 290rpx);
margin-left: 30rpx;
image {
width: 26rpx;
height: 26rpx;
}
.van-field {
background-color: transparent;
box-sizing: border-box;
height: 82rpx;
line-height: 82rpx;
width: calc(100% - 30rpx);
padding: 0rpx 10rpx 0rpx 0rpx;
input {
height: 82rpx;
font-size: 60rpx;
}
}
}
.right-area {
.search-button {
background: #60BDA2;
height: 60rpx;
width: 130rpx;
font-size: 26rpx;
border-radius: 35rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.swipe{
overflow: hidden;
border-radius: 20rpx;
margin: 20rpx;
}
.page{
& /deep/ .uv-icon__icon{
font-size: 30rpx !important;
}
//
.userShop{
.list{
display: flex;
flex-wrap: wrap;
.item{
display: flex;
justify-content: center;
align-items: center;
width: 330rpx;
margin: 20rpx;
padding: 30rpx 0;
color: #FFFFFF;
line-height: 50rpx;
border-radius: 20rpx;
font-size: 28rpx;
.num{
font-size: 38rpx;
font-weight: 900;
}
image{
width: 110rpx;
height: 110rpx;
margin-left: 20rpx;
}
&:nth-child(1){
background: #F07A77;
}
&:nth-child(2){
background: #F48B4E;
}
&:nth-child(3){
background: #6487E1;
}
&:nth-child(4){
background: #61B7E6;
}
}
}
}
//
.user{
padding: 20rpx;
.shop{
position: relative;
display: flex;
align-items: center;
justify-content: center;
background-color: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding: 20rpx;
overflow: hidden;
.image{
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
border-radius: 20rpx;
}
.shopInfo{
font-size: 22rpx;
.title{
font-size: 30rpx;
}
.tags{
display: flex;
.tag{
padding: 4rpx 6rpx;
border: 1rpx solid #FFAC6E;
color: #FFAC6E;
margin-right: 10rpx;
margin-top: 10rpx;
font-size: 18rpx;
}
}
.time{
margin-top: 10rpx;
display: flex;
}
.address{
margin-top: 10rpx;
display: flex;
}
}
.btns{
margin-left: auto;
display: flex;
align-items: center;
justify-content: center;
.btn{
background-color: $uni-color;
color: #fff;
box-shadow: 0 0 5rpx 5rpx #FFAC6E;
padding: 10rpx 20rpx;
flex-shrink: 0;
border-radius: 35rpx;
}
}
.tips{
position: absolute;
top: 0;
right: 0;
font-size: 24rpx;
color: #FFAC6E;
background-color: #FEF5EE;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
</style> </style>

+ 34
- 0
pages/index/keepAccounts.vue View File

@ -0,0 +1,34 @@
<template>
<view class="page">
<navbar/>
<tabber select="1" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components: {
tabber,
},
data() {
return {
}
},
computed: {
},
onReady() {
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

+ 0
- 263
pages/index/order.vue View File

@ -1,263 +0,0 @@
<template>
<view class="page">
<navbar
title="订单中心"
/>
<uv-tabs :list="tabs"
:activeStyle="{color : '#FD5100', fontWeight : 600}"
lineColor="#FD5100"
lineHeight="8rpx"
lineWidth="50rpx"
@click="clickTabs"></uv-tabs>
<view v-if="orderList.length > 0" class="list">
<view class="item"
v-for="(item, index) in orderList.records"
@click="toOrderDetail(item.id)"
:key="index">
<view class="top">
<view class="service">
<text>{{item.projectId_dictText}}</text>
<text>{{item.type_dictText}}</text>
</view>
<view class="status">
<text> {{item.state_dictText}}</text>
</view>
</view>
<view class="content">
<view class="left">
<image mode="aspectFill" :src="item.image"></image>
</view>
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
</view>
<view class="text-hidden-1">
产品规格{{item.unit}}
</view>
<view class="text-hidden-1">
租赁地址{{item.address}}
</view>
<!-- <view class="text-hidden-1">
总计时间{{item.useTime}}分钟
</view> -->
</view>
</view>
<view class="bottom">
<view class="price">
总价格<text class="num">{{item.money}}</text>
</view>
<view class="b1">
查看物流
</view>
<!-- <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
立即付款
</view>
<view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
再来一单
</view>
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
立即评价
</view>
<view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">
再来一单
</view> -->
</view>
</view>
</view>
<tabber select="2"/>
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mapGetters } from 'vuex'
export default {
components : {
tabber,
},
computed : {
...mapGetters(['userShop']),
},
data() {
return {
tabs: [{
name: '全部'
},
{
name: '租赁押金'
},
{
name: '水洗租赁'
},
{
name: '破损换货'
},
{
name: '退货退款'
}
],
queryParams: {
pageNo: 1,
pageSize: 10
},
// orderList: [
// {
// money : 99.99,
// address : '广广C32802',
// name : '**',
// phone : '150*****091',
// unit : '120*40*75',
// image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
// state_dictText : '',
// }
// ], //
orderList : {
records : [],
total : 0,
},
state : -1,
}
},
onShow() {
this.orderPage()
},
//
onReachBottom() {
if(this.queryParams.pageSize < this.orderList.total){
this.queryParams.pageSize += 10
this.orderPage()
}
},
methods: {
orderPage(){
let queryParams = {
...this.queryParams,
}
if(this.state != -1){
queryParams.state = this.state
}
this.$api('orderPage', queryParams, res => {
if(res.code == 200){
this.orderList = res.result
}
})
},
//tab
clickTabs(index) {
if (index == 0) {
this.state = -1;
} else {
this.state = index - 1;
}
this.queryParams.pageSize = 10
this.orderPage()
},
//
toOrderDetail(id) {
uni.navigateTo({
url: '/pages_order/order/orderDetail?id=' + id
})
},
getOrderList(){
},
}
}
</script>
<style scoped lang="scss">
.page{
}
.list {
.item {
width: calc(100% - 40rpx);
background-color: #fff;
margin: 20rpx;
box-sizing: border-box;
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.status {
font-size: 26rpx;
font-weight: 600;
}
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
}
.bottom {
display: flex;
justify-content: space-between;
font-size: 25rpx;
.price {
font-weight: 900;
text {
color: #ff780099;
font-size: 30rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: linear-gradient(178deg, #4FD3BC, #60C285);
color: #fff;
}
view {
margin: 12rpx;
border-radius: 28rpx;
padding: 8rpx 28rpx;
margin-bottom: 0;
}
}
}
}
</style>

BIN
static/image/home/0.png View File

Before After
Width: 116  |  Height: 118  |  Size: 14 KiB

BIN
static/image/home/1.png View File

Before After
Width: 117  |  Height: 117  |  Size: 13 KiB Width: 68  |  Height: 68  |  Size: 1.5 KiB

BIN
static/image/home/2.png View File

Before After
Width: 114  |  Height: 114  |  Size: 12 KiB Width: 68  |  Height: 68  |  Size: 2.4 KiB

BIN
static/image/home/3.png View File

Before After
Width: 114  |  Height: 114  |  Size: 11 KiB Width: 68  |  Height: 68  |  Size: 2.4 KiB

BIN
static/image/home/4.png View File

Before After
Width: 68  |  Height: 68  |  Size: 1.8 KiB

BIN
static/image/home/5.png View File

Before After
Width: 68  |  Height: 68  |  Size: 1.6 KiB

BIN
static/image/home/address-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.4 KiB

BIN
static/image/home/arrow-icon.png View File

Before After
Width: 39  |  Height: 39  |  Size: 296 B

BIN
static/image/home/c.png View File

Before After
Width: 87  |  Height: 83  |  Size: 2.1 KiB

BIN
static/image/home/phone.png View File

Before After
Width: 24  |  Height: 24  |  Size: 747 B

BIN
static/image/home/search-icon.png View File

Before After
Width: 38  |  Height: 38  |  Size: 1.8 KiB

BIN
static/image/tabbar/cart-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 958 B

BIN
static/image/tabbar/cart.png View File

Before After
Width: 40  |  Height: 40  |  Size: 953 B

BIN
static/image/tabbar/category-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.1 KiB

BIN
static/image/tabbar/category.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.2 KiB

BIN
static/image/tabbar/center-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 915 B Width: 40  |  Height: 40  |  Size: 984 B

BIN
static/image/tabbar/home-a.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB Width: 40  |  Height: 40  |  Size: 514 B

BIN
static/image/tabbar/home.png View File

Before After
Width: 47  |  Height: 43  |  Size: 2.2 KiB Width: 40  |  Height: 40  |  Size: 496 B

BIN
static/image/tabbar/order-a.png View File

Before After
Width: 40  |  Height: 40  |  Size: 691 B Width: 40  |  Height: 40  |  Size: 751 B

+ 1
- 1
uni.scss View File

@ -12,7 +12,7 @@
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件 * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/ */
/* 颜色变量 */ /* 颜色变量 */
$uni-color: #FD5100;
$uni-color: #3796F8;
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #007aff;


+ 2
- 2
utils/position.js View File

@ -8,7 +8,7 @@ import config from '../config.js'
* @param {number} lon2 地点2维度 * @param {number} lon2 地点2维度
* @param {number} fixed 保留几位小数,默认0,单位km * @param {number} fixed 保留几位小数,默认0,单位km
*/ */
function calculateDistance(lat1, lon1, lat2, lon2) { //计算两点距离
function calculateDistance(lat1, lon1, lat2, lon2, fixed = 0) { //计算两点距离
let distance = 0 let distance = 0
if (!lat2 || !lon2) return distance if (!lat2 || !lon2) return distance
//先强制转换一下(后端给的字符串) //先强制转换一下(后端给的字符串)
@ -28,7 +28,7 @@ function calculateDistance(lat1, lon1, lat2, lon2) { //计算两点距离
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
// 计算距离 // 计算距离
distance = R * c; distance = R * c;
return distance.toFixed(0)
return distance.toFixed(fixed)
} }
function getLocation(fn) { //获取用户经纬度 function getLocation(fn) { //获取用户经纬度


Loading…
Cancel
Save