Commit 4cd335da by zhangzhen

优化功能

parent 6e385ba6
import http from "@/common/vmeitime-http/index.js"
// 获取用户负责的保洁门店和房间
export const getListStore=()=>{
let url=`/store/listVoByCleaner`
return http.get(url)
}
export const getInfoByRoomId=(roomId)=>{
let url=`/cleanRecords/getByRoomId/${roomId}`
return http.get(url)
}
export const startClean=(data)=>{
let url=`cleanRecords/startClean`
return http.post(url,data)
}
export const endClean=(data)=>{
let url=`cleanRecords/endClean`
return http.post(url,data)
}
...@@ -188,6 +188,7 @@ export default { ...@@ -188,6 +188,7 @@ export default {
} }
}, },
scrollTop(val) { scrollTop(val) {
console.log(val,909090)
this.pageScroll({ this.pageScroll({
scrollTop: val scrollTop: val
}); });
......
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
{ {
name:"验券", name:"验券",
sortName:"验" sortName:"验"
},
{
name:"客服",
sortName:"客"
} }
], ],
timer:null timer:null
......
...@@ -2,10 +2,10 @@ const CONFIG = { ...@@ -2,10 +2,10 @@ const CONFIG = {
// 开发环境配置 // 开发环境配置
development: { development: {
assetsPath: '/static', // 静态资源路径 assetsPath: '/static', // 静态资源路径
// baseUrl: 'http://192.168.137.48:8883/front', // 后台接口请求地址
// hostUrl: 'http://192.168.137.48:8882', // H5地址(前端运行地址)
baseUrl: 'http://10.106.30.136:8883/front', // 后台接口请求地址 baseUrl: 'http://10.106.30.136:8883/front', // 后台接口请求地址
hostUrl: 'http://10.106.30.136:8882', // H5地址(前端运行地址) hostUrl: 'http://10.106.30.136:8882', // H5地址(前端运行地址)
// baseUrl: 'http://192.168.43.242:8883/front', // 后台接口请求地址
// hostUrl: 'http://192.168.43.242:8882', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址 websocketUrl: '', // websocket服务端地址
weixinAppId: '' ,// 微信公众号appid weixinAppId: '' ,// 微信公众号appid
codeHeadUrl:"", codeHeadUrl:"",
......
{ {
"pages": [ "pages": [
{ {
"path": "pages/storeList/storeList", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "选择门店", "navigationBarTitleText": "首页",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/index/index", "path": "pages/storeList/storeList",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "选择门店",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
...@@ -55,60 +55,54 @@ ...@@ -55,60 +55,54 @@
"navigationBarTitleText": "详情", "navigationBarTitleText": "详情",
"navigationStyle": "default" "navigationStyle": "default"
} }
}, },
{
"path" : "pages/article/article",
"style" :
{
"navigationBarTitleText": "详情",
"navigationStyle": "default"
}
},
{ {
"path" : "pages/couponList/index", "path": "pages/article/article",
"style" : "style": {
{ "navigationBarTitleText": "详情",
"navigationBarTitleText": "我的优惠券", "navigationStyle": "default"
"navigationStyle": "default"
} }
}, },
{ {
"path" : "pages/useCoupon/index", "path": "pages/couponList/index",
"style" : "style": {
{ "navigationBarTitleText": "我的优惠券",
"navigationBarTitleText": "选择优惠券", "navigationStyle": "default"
"navigationStyle": "default" }
},
{
"path": "pages/useCoupon/index",
"style": {
"navigationBarTitleText": "选择优惠券",
"navigationStyle": "default"
} }
}, },
{ {
"path" : "pages/cleanManage/cleanManage", "path": "pages/cleanManage/cleanManage",
"style" : "style": {
{ "navigationBarTitleText": "保洁管理",
"navigationBarTitleText": "保洁管理", "enablePullDownRefresh": false
"enablePullDownRefresh": false }
}
},
} {
,{ "path": "pages/cleanOrderInfo/cleanOrderInfo",
"path" : "pages/cleanOrderInfo/cleanOrderInfo", "style": {
"style" : "navigationBarTitleText": "保洁订单",
{ "enablePullDownRefresh": false
"navigationBarTitleText": "保洁订单", }
"enablePullDownRefresh": false
} },
{
} "path": "pages/orderResult/orderResult",
,{ "style": {
"path" : "pages/orderResult/orderResult", "navigationBarTitleText": "下单完成",
"style" : "enablePullDownRefresh": false
{ }
"navigationBarTitleText": "下单完成",
"enablePullDownRefresh": false }
} ],
}
],
"globalStyle": { "globalStyle": {
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
...@@ -121,18 +115,17 @@ ...@@ -121,18 +115,17 @@
"selectedColor": "#E40583", "selectedColor": "#E40583",
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"list": [ "list": [{
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/tab-bar-img/home.png", "iconPath": "static/tab-bar-img/home.png",
"selectedIconPath": "static/tab-bar-img/home_selected.png", "selectedIconPath": "static/tab-bar-img/home_selected.png",
"text": "首页" "text": "首页"
}, },
{ {
"pagePath": "pages/roomList/roomList", "pagePath": "pages/orderRecord/orderRecord",
"iconPath": "static/tab-bar-img/order.png", "iconPath": "static/tab-bar-img/order.png",
"selectedIconPath": "static/tab-bar-img/order_selected.png", "selectedIconPath": "static/tab-bar-img/order_selected.png",
"text": "预约" "text": "订单"
}, },
{ {
"pagePath": "pages/my/myInfo", "pagePath": "pages/my/myInfo",
...@@ -142,4 +135,4 @@ ...@@ -142,4 +135,4 @@
} }
] ]
} }
} }
\ No newline at end of file
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
</template> </template>
<script> <script>
import {getListStore} from "@/api/cleanRoom.js";
export default { export default {
data() { data() {
return { return {
...@@ -184,9 +186,14 @@ ...@@ -184,9 +186,14 @@
}; };
}, },
onLoad() { onLoad() {
this.onLoading()
}, },
methods:{ methods:{
onLoading(){
getListStore().then(res=>{
console.log(res)
})
},
onNavToInfo(){ onNavToInfo(){
uni.navigateTo({ uni.navigateTo({
url:"/pages/cleanOrderInfo/cleanOrderInfo" url:"/pages/cleanOrderInfo/cleanOrderInfo"
......
...@@ -70,16 +70,27 @@ ...@@ -70,16 +70,27 @@
</template> </template>
<script> <script>
import {getInfoByRoomId} from "@/api/cleanRoom.js";
export default { export default {
data() { data() {
return { return {
imgList:[], imgList:[],
orderInfo:{},
}; };
}, },
onLoad() { onLoad() {
this.onLoading();
}, },
methods:{ methods:{
onLoading(){
getInfoByRoomId(this.roomId).then(res=>{
console.log(res,90909090)
if(res.data.code === 200){
this.orderInfo = res.data.data;
}
})
},
onChooseImage() { onChooseImage() {
uni.chooseImage({ uni.chooseImage({
count: 4, //默认9 count: 4, //默认9
......
<template> <template>
<view class="home" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd"> <view class="home" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd">
<view class="header-content" :style="{height: statusBarHeight + 210+'px',paddingTop:statusBarHeight+'px' }"> <f-navbar title="凑角" :isShowTransparentTitle="false" :isShowLeft="false" fontColor="#ffffff" bgColor="#e40583"
<image src="../../static/banner.png" mode="widthFix"></image> :scrollTop="scrollTop" navbarType='5'></f-navbar>
</view> <scroll-view class="scroll-view" scroll-y="true" @scroll="onScroll">
<view class="store-nav"> <view class="content-box">
<view class="icon-box"> <view class="header-content"
<image src="../../static/cart.png" mode="widthFix"></image> :style="{height: statusBarHeight + 210+'px',paddingTop:statusBarHeight+'px' }">
</view> <image src="../../static/banner.png" mode="widthFix"></image>
<view class="flex-col content">
<view class="flex-row title-content ">
<text>凑角共享棋牌室</text>
<button class="cu-btn round line-pink" @tap="onNavToChangeStore">切换门店</button>
</view> </view>
<view class="flex-1 tips-content"> <view class="store-nav">
<image class="bg-img" src="../../static/44@2x.png" mode="scaleToFill"></image> <view class="icon-box">
<view class="flex-between tips-box"> <image src="../../static/cart.png" mode="widthFix"></image>
<view class="flex-col part-left"> </view>
<view class="flex-1 store-name"> <view class="flex-col content">
<text>{{storeInfo.name}}</text> <view class="flex-row title-content ">
</view> <text>凑角共享棋牌室</text>
<view class="flex-1 flex-row"> <button class="cu-btn round bg-pink text-bold text-xl"
<text class="cuIcon-locationfill text-red"></text> @tap="onNavToChangeStore">切换门店</button>
<text>距您{{storeInfo &&storeInfo.distance? Number(storeInfo.distance).toFixed(2):999}}公里</text>
</view>
</view> </view>
<view class="flex-row part-right"> <view class="flex-1 tips-content">
<image src="../../static/map_icon.png" mode="widthFix" @tap="onNavToMap"></image> <image class="bg-img" src="../../static/44@2x.png" mode="scaleToFill"></image>
<image src="../../static/phone_icon.png" mode="widthFix" @tap="onOpenTelphone"></image> <view class="flex-between tips-box">
<view class="flex-col part-left">
<view class="flex-1 store-name">
<text>{{storeInfo.name}}</text>
</view>
<view class="flex-1 flex-row">
<text class="cuIcon-locationfill text-red"></text>
<text>距您{{storeInfo &&storeInfo.distance? Number(storeInfo.distance).toFixed(2):999}}公里</text>
</view>
</view>
<view class="flex-row part-right">
<image src="../../static/map_icon.png" mode="widthFix" @tap="onNavToMap"></image>
<image src="../../static/phone_icon.png" mode="widthFix" @tap="onOpenTelphone">
</image>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> <!-- <view class="flex-row fun-list">
</view>
<!-- <view class="flex-row fun-list">
<view class="flex-1"> <view class="flex-1">
<image src="../../static/open_door.png" mode="widthFix"></image> <image src="../../static/open_door.png" mode="widthFix"></image>
</view> </view>
...@@ -43,56 +50,61 @@ ...@@ -43,56 +50,61 @@
<image src="../../static/verify_coupon.png" mode="widthFix"></image> <image src="../../static/verify_coupon.png" mode="widthFix"></image>
</view> </view>
</view> --> </view> -->
<view class="banner2"> <view class="banner2">
<image src="../../static/banner2.png" mode="widthFix"></image> <image src="../../static/banner2.png" mode="widthFix"></image>
</view>
<view class="flex-col list-box">
<view class="title">
<text class="text-title">房间预览</text>
</view>
<view v-for="(item,index) in storeInfo.roomVoList" :key="index" class="list-item-box">
<view class="relative part-top">
<image class="room-img" :src="item.images[0]" mode="widthFix"></image>
<view class="absolute part-top-content">
<view class="flex-between">
<view></view>
<image src="../../static/nav_to_icon.png" mode="widthFix" @tap="onNavToInfo(item)"></image>
</view>
<view class="tip-list-box">
<view v-for="(item,index) in iconList" :key="index" class="tip-item">
<image :src="item.url" mode="widthFix"></image>
</view>
</view>
</view>
</view> </view>
<view class="flex-col part-bottom"> <view class="flex-col list-box">
<view class="flex-1 flex-between room-title"> <view class="title">
<view class="room-name"> <text class="text-title">房间预览</text>
<text>{{item.name}}</text>
</view>
<view class="flex-row price">
<text></text><text class="text-pink">{{item.price}}</text><text>/小时</text>
</view>
</view> </view>
<view class="flex-1 flex-between"> <view v-for="(item,index) in storeInfo.roomVoList" :key="index" class="list-item-box">
<view class="flex-row room-type"> <view class="relative part-top">
<text>房间套餐</text> <image class="room-img" :src="item.images[0]" mode="widthFix"></image>
<view v-for="(item,i) in options" :key="i" class="item"> <view class="absolute part-top-content">
<text>{{item.label}}</text> <view class="flex-between">
<view></view>
<image src="../../static/nav_to_icon.png" mode="widthFix" @tap="onNavToInfo(item)">
</image>
</view>
<view class="tip-list-box">
<view v-for="(item,index) in iconList" :key="index" class="tip-item">
<image :src="item.url" mode="widthFix"></image>
</view>
</view>
</view> </view>
</view> </view>
<view class="confirm" @tap="onNavToOrder(item)"> <view class="flex-col part-bottom">
<text class="cuIcon-add text-white text-lg"></text> <view class="flex-1 flex-between room-title">
<view class="room-name">
<text>{{item.name}}</text>
</view>
<view class="flex-row price">
<text></text><text class="text-pink">{{item.price}}</text><text>/小时</text>
</view>
</view>
<view class="flex-1 flex-between">
<view class="flex-row room-type">
<text>房间套餐</text>
<view v-for="(item,i) in options" :key="i" class="item">
<text>{{item.label}}</text>
</view>
</view>
<view class="confirm" @tap="onNavToOrder(item)">
<text class="cuIcon-add text-white text-lg"></text>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </scroll-view>
<ToolBox v-model="show" /> <ToolBox v-model="show" />
</view> </view>
</template> </template>
<script> <script>
import fNavbar from '@/components/module/f-navbar/f-navbar';
import { import {
login login
} from "@/api/index.js"; } from "@/api/index.js";
...@@ -101,19 +113,21 @@ ...@@ -101,19 +113,21 @@
} from "@/api/store"; } from "@/api/store";
import config from "@/config/index.config" import config from "@/config/index.config"
import ToolBox from "@/components/toolBox/toolBox" import ToolBox from "@/components/toolBox/toolBox"
export default { export default {
components:{ components: {
fNavbar,
ToolBox ToolBox
}, },
data() { data() {
return { return {
scrollTop: 0,
storeId: '', storeId: '',
storeInfo: {}, storeInfo: {},
statusBarHeight: this.statusBarHeight, statusBarHeight: this.statusBarHeight,
hostUrl: config.hostUrl, hostUrl: config.hostUrl,
latitude: uni.getStorageSync("latitude") ||"", latitude: uni.getStorageSync("latitude") || "",
longitude: uni.getStorageSync("longitude")||"", longitude: uni.getStorageSync("longitude") || "",
queryParams: { queryParams: {
nowLatitude: "", nowLatitude: "",
nowLongitude: "", nowLongitude: "",
...@@ -151,8 +165,8 @@ ...@@ -151,8 +165,8 @@
label: "8小时" label: "8小时"
} }
], ],
show:true, show: true,
timer:null timer: null
} }
}, },
onShow() { onShow() {
...@@ -176,10 +190,14 @@ ...@@ -176,10 +190,14 @@
}, },
onLoad(option) { onLoad(option) {
console.log(option, 909090) console.log(option, 909090)
}, },
methods: { methods: {
onScroll(e){
console.log(e,90909090)
},
onLoading() { onLoading() {
this.onGetListStore() this.onGetListStore()
}, },
onGetListStore() { onGetListStore() {
getListStore({ getListStore({
...@@ -251,25 +269,25 @@ ...@@ -251,25 +269,25 @@
} }
}) })
}, },
onTouchStart(){ onTouchStart() {
this.timer = null; this.timer = null;
this.show = true; this.show = true;
}, },
onTouchMove(){ onTouchMove() {
if(!this.timer){ if (!this.timer) {
this.timer = setTimeout(()=>{ this.timer = setTimeout(() => {
this.show = false; this.show = false;
},200) }, 200)
} }
}, },
onTouchEnd(){ onTouchEnd() {
if(this.timer){ if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
if(!this.show){ if (!this.show) {
this.show = true this.show = true
} }
} }
}, },
} }
...@@ -303,6 +321,14 @@ ...@@ -303,6 +321,14 @@
} }
} }
.scroll-view{
width: 100vw;
.content-box{
display: flex;
flex-direction: column;
width: 100%;
}
}
.store-nav { .store-nav {
position: relative; position: relative;
display: flex; display: flex;
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
<text class="text-lg text-white text-bold">选择门店</text> <text class="text-lg text-white text-bold">选择门店</text>
</view> </view>
<view class="cu-bar search"> <view class="cu-bar search">
<view class="city-box">
<text class="icon cuIcon-location"></text>
<text>武汉</text>
</view>
<view class="search-form round"> <view class="search-form round">
<text class="cuIcon-search"></text> <text class="cuIcon-search"></text>
<input type="text" placeholder="请输入门店关键词" confirm-type="search"></input> <input type="text" placeholder="请输入门店关键词" confirm-type="search"></input>
...@@ -234,4 +238,21 @@ ...@@ -234,4 +238,21 @@
align-items: center; align-items: center;
min-height: 400upx; min-height: 400upx;
} }
.city-box{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
height: 100%;
color: #f8f8f8;
font-weight: bold;
margin-left: 20upx;
.icon{
margin-top: 5upx;
}
text{
font-size: 14px;
letter-spacing: 4upx;
}
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment