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 {
}
},
scrollTop(val) {
console.log(val,909090)
this.pageScroll({
scrollTop: val
});
......
......@@ -31,6 +31,10 @@
{
name:"验券",
sortName:"验"
},
{
name:"客服",
sortName:"客"
}
],
timer:null
......
......@@ -2,10 +2,10 @@ const CONFIG = {
// 开发环境配置
development: {
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', // 后台接口请求地址
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服务端地址
weixinAppId: '' ,// 微信公众号appid
codeHeadUrl:"",
......
{
"pages": [
{
"path": "pages/storeList/storeList",
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "选择门店",
"navigationBarTitleText": "首页",
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"path": "pages/storeList/storeList",
"style": {
"navigationBarTitleText": "首页",
"navigationBarTitleText": "选择门店",
"navigationStyle": "custom"
}
},
......@@ -57,52 +57,46 @@
}
},
{
"path" : "pages/article/article",
"style" :
{
"path": "pages/article/article",
"style": {
"navigationBarTitleText": "详情",
"navigationStyle": "default"
}
},
{
"path" : "pages/couponList/index",
"style" :
{
"path": "pages/couponList/index",
"style": {
"navigationBarTitleText": "我的优惠券",
"navigationStyle": "default"
}
},
{
"path" : "pages/useCoupon/index",
"style" :
{
"path": "pages/useCoupon/index",
"style": {
"navigationBarTitleText": "选择优惠券",
"navigationStyle": "default"
}
},
{
"path" : "pages/cleanManage/cleanManage",
"style" :
{
"path": "pages/cleanManage/cleanManage",
"style": {
"navigationBarTitleText": "保洁管理",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/cleanOrderInfo/cleanOrderInfo",
"style" :
},
{
"path": "pages/cleanOrderInfo/cleanOrderInfo",
"style": {
"navigationBarTitleText": "保洁订单",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/orderResult/orderResult",
"style" :
},
{
"path": "pages/orderResult/orderResult",
"style": {
"navigationBarTitleText": "下单完成",
"enablePullDownRefresh": false
}
......@@ -121,18 +115,17 @@
"selectedColor": "#E40583",
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"list": [
{
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tab-bar-img/home.png",
"selectedIconPath": "static/tab-bar-img/home_selected.png",
"text": "首页"
},
{
"pagePath": "pages/roomList/roomList",
"pagePath": "pages/orderRecord/orderRecord",
"iconPath": "static/tab-bar-img/order.png",
"selectedIconPath": "static/tab-bar-img/order_selected.png",
"text": "预约"
"text": "订单"
},
{
"pagePath": "pages/my/myInfo",
......
......@@ -63,6 +63,8 @@
</template>
<script>
import {getListStore} from "@/api/cleanRoom.js";
export default {
data() {
return {
......@@ -184,9 +186,14 @@
};
},
onLoad() {
this.onLoading()
},
methods:{
onLoading(){
getListStore().then(res=>{
console.log(res)
})
},
onNavToInfo(){
uni.navigateTo({
url:"/pages/cleanOrderInfo/cleanOrderInfo"
......
......@@ -70,16 +70,27 @@
</template>
<script>
import {getInfoByRoomId} from "@/api/cleanRoom.js";
export default {
data() {
return {
imgList:[],
orderInfo:{},
};
},
onLoad() {
this.onLoading();
},
methods:{
onLoading(){
getInfoByRoomId(this.roomId).then(res=>{
console.log(res,90909090)
if(res.data.code === 200){
this.orderInfo = res.data.data;
}
})
},
onChooseImage() {
uni.chooseImage({
count: 4, //默认9
......
<template>
<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"
:scrollTop="scrollTop" navbarType='5'></f-navbar>
<scroll-view class="scroll-view" scroll-y="true" @scroll="onScroll">
<view class="content-box">
<view class="header-content"
:style="{height: statusBarHeight + 210+'px',paddingTop:statusBarHeight+'px' }">
<image src="../../static/banner.png" mode="widthFix"></image>
</view>
<view class="store-nav">
......@@ -10,7 +15,8 @@
<view class="flex-col content">
<view class="flex-row title-content ">
<text>凑角共享棋牌室</text>
<button class="cu-btn round line-pink" @tap="onNavToChangeStore">切换门店</button>
<button class="cu-btn round bg-pink text-bold text-xl"
@tap="onNavToChangeStore">切换门店</button>
</view>
<view class="flex-1 tips-content">
<image class="bg-img" src="../../static/44@2x.png" mode="scaleToFill"></image>
......@@ -26,13 +32,14 @@
</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>
<image src="../../static/phone_icon.png" mode="widthFix" @tap="onOpenTelphone">
</image>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="flex-row fun-list">
<!-- <view class="flex-row fun-list">
<view class="flex-1">
<image src="../../static/open_door.png" mode="widthFix"></image>
</view>
......@@ -56,7 +63,8 @@
<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>
<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">
......@@ -88,11 +96,15 @@
</view>
</view>
</view>
</view>
</scroll-view>
<ToolBox v-model="show" />
</view>
</template>
<script>
import fNavbar from '@/components/module/f-navbar/f-navbar';
import {
login
} from "@/api/index.js";
......@@ -103,17 +115,19 @@
import ToolBox from "@/components/toolBox/toolBox"
export default {
components:{
components: {
fNavbar,
ToolBox
},
data() {
return {
scrollTop: 0,
storeId: '',
storeInfo: {},
statusBarHeight: this.statusBarHeight,
hostUrl: config.hostUrl,
latitude: uni.getStorageSync("latitude") ||"",
longitude: uni.getStorageSync("longitude")||"",
latitude: uni.getStorageSync("latitude") || "",
longitude: uni.getStorageSync("longitude") || "",
queryParams: {
nowLatitude: "",
nowLongitude: "",
......@@ -151,8 +165,8 @@
label: "8小时"
}
],
show:true,
timer:null
show: true,
timer: null
}
},
onShow() {
......@@ -176,8 +190,12 @@
},
onLoad(option) {
console.log(option, 909090)
},
methods: {
onScroll(e){
console.log(e,90909090)
},
onLoading() {
this.onGetListStore()
},
......@@ -251,22 +269,22 @@
}
})
},
onTouchStart(){
onTouchStart() {
this.timer = null;
this.show = true;
},
onTouchMove(){
if(!this.timer){
this.timer = setTimeout(()=>{
onTouchMove() {
if (!this.timer) {
this.timer = setTimeout(() => {
this.show = false;
},200)
}, 200)
}
},
onTouchEnd(){
if(this.timer){
onTouchEnd() {
if (this.timer) {
clearTimeout(this.timer)
}
if(!this.show){
if (!this.show) {
this.show = true
}
......@@ -303,6 +321,14 @@
}
}
.scroll-view{
width: 100vw;
.content-box{
display: flex;
flex-direction: column;
width: 100%;
}
}
.store-nav {
position: relative;
display: flex;
......
......@@ -5,6 +5,10 @@
<text class="text-lg text-white text-bold">选择门店</text>
</view>
<view class="cu-bar search">
<view class="city-box">
<text class="icon cuIcon-location"></text>
<text>武汉</text>
</view>
<view class="search-form round">
<text class="cuIcon-search"></text>
<input type="text" placeholder="请输入门店关键词" confirm-type="search"></input>
......@@ -234,4 +238,21 @@
align-items: center;
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>
\ 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