Commit d589b72d by 宋冰琦
parents 90d0313f 53ad1e95
...@@ -10,6 +10,7 @@ export default function initToast(v) { ...@@ -10,6 +10,7 @@ export default function initToast(v) {
}, },
mutations: { mutations: {
hideToast(state) { hideToast(state) {
// #ifndef
if(state.hideTabBar){ if(state.hideTabBar){
wx.showTabBar(); wx.showTabBar();
} }
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
</view> </view>
<view class="mon"> <view class="mon">
<view class="priceBox"> <view class="priceBox">
<view class="discount">{{ getSku(item).discount }}</view> <view class="discount">{{ Utils.isInteger(getSku(item).discount) }}</view>
<view class="price"><text class="num">{{ getSku(item).price }}</text></view> <view class="price" v-if="getSku(item).price!=getSku(item).discount"><text class="num">{{ Utils.isInteger(getSku(item).price) }}</text></view>
</view> </view>
<view class="addbox"> <view class="addbox">
<image v-if="getSku(item).state==1" @click.stop="getallNum(item, category)" class="add" :src="'../../static/imgs/jiahao.png'" /> <image v-if="getSku(item).state==1" @click.stop="getallNum(item, category)" class="add" :src="'../../static/imgs/jiahao.png'" />
...@@ -45,11 +45,13 @@ ...@@ -45,11 +45,13 @@
<script> <script>
import { $EventBus } from "../../utils/EventBus"; import { $EventBus } from "../../utils/EventBus";
import Utils from '@/utils/utils'
export default { export default {
name: 'menuAssembly', name: 'menuAssembly',
props:['buied'], props:['buied'],
data() { data() {
return { return {
Utils,
classifyData: [], classifyData: [],
categoryId: '', categoryId: '',
categoryPostion: [], categoryPostion: [],
......
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
</text> </text>
</view> </view>
<view class="goods-price"> <view class="goods-price">
<text class="price-discount">{{ item.sku.discount }}</text> <text class="price-discount">{{ Utils.isInteger(item.sku.discount) }}</text>
<text class="price-x"></text> <text class="price-x" v-show="item.sku.price!=item.sku.discount"></text>
<text class="price-xx">{{ item.sku.price }}</text> <text class="price-xx" v-show="item.sku.price!=item.sku.discount">{{ Utils.isInteger(item.sku.price) }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<view class="car-img"> <view class="car-img">
<text class="badge" v-if="totalNum">{{ totalNum }}</text> <text class="badge" v-if="totalNum">{{ totalNum }}</text>
</view> </view>
<text class="shopClassStyle">{{ totalPrice.toFixed(2) }}</text> <text class="shopClassStyle">{{ Utils.isInteger(totalPrice.toFixed(2)) }}</text>
</view> </view>
</view> </view>
<view class="end-right goSubmmit" @click="saveReserve" v-if="userms"> <view class="end-right goSubmmit" @click="saveReserve" v-if="userms">
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
import { $EventBus } from "../../utils/EventBus"; import { $EventBus } from "../../utils/EventBus";
import Menu from '@/request/menu'; import Menu from '@/request/menu';
import User from '@/request/user'; import User from '@/request/user';
import Utils from '@/utils/utils'
export default { export default {
data() { data() {
return { return {
...@@ -100,6 +101,7 @@ export default { ...@@ -100,6 +101,7 @@ export default {
goods: [],//购物车商品信息 goods: [],//购物车商品信息
loginInfo: "", loginInfo: "",
imgPath: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic3%2Fcover%2F01%2F82%2F40%2F596fa6dc00bb4_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1633499781&t=d37222e32213957ddbdd01d62e071309', imgPath: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.51yuansu.com%2Fpic3%2Fcover%2F01%2F82%2F40%2F596fa6dc00bb4_610.jpg&refer=http%3A%2F%2Fpic.51yuansu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1633499781&t=d37222e32213957ddbdd01d62e071309',
Utils
} }
}, },
created() { created() {
......
<template> <template>
<view ew class="product-list"> <view ew class="product-list">
<view class="provice_city">
<view class="text">
<text>{{areaName.proviceName}}-</text>
<text v-show="areaName.proviceName!=areaName.cityName">{{areaName.cityName}}-</text>
<text>{{areaName.disName}}</text>
</view>
<view class="icon">
<image :style="{'height':'100%','width':'100%'}" :src="'../../../static/imgs/jiantouhei.png'" />
</view>
</view>
<div v-for="item in list" :key="item.id" @click="selectedShop(item)" class="shop_item"> <div v-for="item in list" :key="item.id" @click="selectedShop(item)" class="shop_item">
<div class="header"> <div class="header">
<h3>{{ item.name }}</h3> <h3>{{ item.name }}</h3>
<span v-if="item.distance && item.distance!=-1">距离 {{ item.distance }}</span> <view class="adressBox">
<view>
<u-icon class="map" name="map" color="#999999" size="14"></u-icon>
</view>
<view class="address">{{ item.address }}</view>
</view>
<view class="timeBox">
<view>
<u-icon name="clock" color="#999999" size="14"></u-icon>
</view>
<view class="time">{{ item.startTime }} - {{ item.endTime }}</view>
</view>
</div> </div>
<view class="line"></view>
<div class="dec"> <div class="dec">
<div class="address">{{ item.address }}</div> <view :style="{'height':'34rpx'}" v-show="item.distance && item.distance!=-1"></view>
<a class="xaidan">去下单</a> <view class="goshop"></view>
</div> <view :style="{'height':'34rpx'}" class="distance" v-show="item.distance && item.distance!=-1">距离 {{ item.distance }}</view>
<div class="time">
<u-icon name="clock" color="#2979ff" size="16"></u-icon>
<div>营业时间:{{ item.startTime }} - {{ item.endTime }}</div>
</div> </div>
</div> </div>
</view> </view>
...@@ -25,11 +44,13 @@ export default { ...@@ -25,11 +44,13 @@ export default {
return { return {
show: true, show: true,
columns: [], columns: [],
list: [] list: [],
areaName:{}
} }
}, },
onShow() { onShow() {
this.list = uni.getStorageSync('shops'); this.list = uni.getStorageSync('shops');
this.areaName = uni.getStorageSync('areaName')
}, },
methods: { methods: {
selectedShop(item) { selectedShop(item) {
...@@ -42,72 +63,108 @@ export default { ...@@ -42,72 +63,108 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.product-list{
background: #F2F2F2;
height:100vh ;
overflow: auto;
}
.provice_city{
height: 62rpx;
background: #FFFFFF;
display: flex;
justify-content: flex-start;
padding: 12rpx 32rpx;
align-items: center;
.text{
font-size: 26rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #000000;
line-height: 36rpx;
}
.icon {
width: 22rpx;
margin-left: 16rpx;
height: 24rpx;
display: flex;
align-items: center;
}
}
.shop_item { .shop_item {
width: 90%; width: 90%;
height: 264rpx; min-height: 264rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 10rpx; border: 1px solid #003AE9;
border: 2rpx solid #006ECF; padding: 25rpx 32rpx;
padding: 32rpx;
box-sizing: border-box; box-sizing: border-box;
margin: 30rpx auto; margin: 30rpx auto;
display: flex;
justify-content: flex-start;
align-items: center;
.header { .header {
display: flex; margin-right: 30rpx;
align-items: center;
justify-content: space-between;
h3 { h3 {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #000000; color: #333333;
} }
.adressBox{
span { width: 348rpx;
font-size: 24rpx; margin-top: 14rpx;
font-family: PingFangSC-Regular, PingFang SC; display: flex;
font-weight: 400; justify-content: flex-start;
color: #666666; .address{
margin-left: 12rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
.timeBox{
margin-top: 11rpx;
display: flex;
align-items: center;
justify-content: flex-start;
.time{
margin-left: 12rpx;
font-size: 24rpx;
font-family: ArialMT;
color: #999999;
}
} }
} }
.line {
height: 146rpx;
border: 1rpx solid #979797;
}
.dec { .dec {
margin-left: 43rpx;
display: flex; display: flex;
justify-content: space-between; flex-direction: column;
margin-top: 22rpx; height: 146rpx;
justify-content: space-around;
.address { view{
font-size: 24rpx; vertical-align: baseline;
font-family: PingFangSC-Regular, }
.goshop {
width: 167rpx;
height: 64rpx;
background: url('@/static/imgs/qupinchang.png') center center no-repeat;
} }
.xaidan { .distance {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500; font-weight: 400;
color: #FFFFFF; color: #999999;
width: 150rpx;
min-width: 150rpx;
text-align: center; text-align: center;
height: 40rpx; line-height: 50rpx;
line-height: 40rpx;
background: #006ECF;
border-radius: 6px;
display: block;
margin-left: 20rpx;
} }
}
.time {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 30rpx;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<view class="good-select good-select-height" :style="{'padding-bottom':BottomSafeHeight+'px'}"> <view class="good-select good-select-height" :style="{'padding-bottom':BottomSafeHeight+'px'}">
<view class="good-select-price"> <view class="good-select-price">
<div> <div>
<text class="good-select-price-normal">{{ priceTotal.discount }}</text> <text class="good-select-price-normal">{{ Utils.isInteger(priceTotal.discount) }}</text>
<text class="good-select-price-small">{{ priceTotal.price }}</text> <text class="good-select-price-small" v-show="priceTotal.price!=priceTotal.discount">{{ Utils.isInteger(priceTotal.price) }}</text>
</div> </div>
<div v-if="!size > 0" style="color: orangered">已售罄</div> <div v-if="!size > 0" style="color: orangered">已售罄</div>
<div v-else class="set_size"> <div v-else class="set_size">
...@@ -102,7 +102,8 @@ export default { ...@@ -102,7 +102,8 @@ export default {
size: 0, size: 0,
topBarTop:0, topBarTop:0,
topBarHeight:0, topBarHeight:0,
BottomSafeHeight:0 BottomSafeHeight:0,
Utils
} }
}, },
onShow() { onShow() {
...@@ -224,10 +225,13 @@ export default { ...@@ -224,10 +225,13 @@ export default {
callback && callback(true) callback && callback(true)
} }
}, },
addGood() { checkNum(type){
const shopCarInfo = uni.getStorageSync('shopCarInfo') || []
let shopCarNum = (type=='add'?1:0)
shopCarInfo.forEach(item=> shopCarNum+=item.num)
let countOfOrder = uni.getStorageSync('countOfOrder'); let countOfOrder = uni.getStorageSync('countOfOrder');
if (this.size < countOfOrder) { if ((this.size + shopCarNum) <= countOfOrder) {
this.size = this.size + 1; return true
} else { } else {
this.showToast({ this.showToast({
title: '最多可一次购买'+countOfOrder+'杯', title: '最多可一次购买'+countOfOrder+'杯',
...@@ -236,18 +240,24 @@ export default { ...@@ -236,18 +240,24 @@ export default {
} }
}, },
addGood() {
if(this.checkNum('add')){
this.size = this.size + 1;
}
},
reduceGood() { reduceGood() {
const { size } = this const { size } = this
if (size > 1) { if (size > 1) {
this.size = size - 1; this.size = size - 1;
} }
}, },
shoppingCart() { shoppingCart() {
const { goods } = this; if(this.checkNum('addShop')){
goods.num = this.size; const { goods } = this;
Utils.getallNum(goods) goods.num = this.size;
uni.switchTab({ url: '/pages/menu/menu' }) Utils.getallNum(goods)
uni.switchTab({ url: '/pages/menu/menu' })
}
}, },
getallNum(e) { getallNum(e) {
let Authorization = uni.getStorageSync('Authorization'); let Authorization = uni.getStorageSync('Authorization');
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="goods_text"> <div class="goods_text">
<div class="goods_name"> <div class="goods_name">
<div class="name">{{ item.goodsName }}</div> <div class="name">{{ item.goodsName }}</div>
<div class="price">¥{{ setPrice(item.realAmount) }}</div> <div class="price">¥{{ Utils.isInteger(setPrice(item.realAmount)) }}</div>
</div> </div>
<div class="goods_psce"> <div class="goods_psce">
<div class="psce_name"> <div class="psce_name">
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<div class="size">{{ totalNum }}件商品</div> <div class="size">{{ totalNum }}件商品</div>
<div> <div>
<span class="paid_in">实付</span> <span class="paid_in">实付</span>
<span class="money">{{ setPrice(orderInfo.amount) }}</span> <span class="money">{{ Utils.isInteger(setPrice(orderInfo.amount)) }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -124,7 +124,8 @@ export default { ...@@ -124,7 +124,8 @@ export default {
data() { data() {
return { return {
orderInfo: {}, orderInfo: {},
ewmImg: '' ewmImg: '',
Utils
} }
}, },
methods: { methods: {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="goods_text"> <div class="goods_text">
<div class="goods_name"> <div class="goods_name">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="price">¥{{ setPrice(item.sku.discount) }}</div> <div class="price">¥{{ Utils.isInteger(setPrice(item.sku.discount)) }}</div>
</div> </div>
<div class="goods_psce"> <div class="goods_psce">
<div class="psce_name"> <div class="psce_name">
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<div class="size">{{ totalNum }}件商品</div> <div class="size">{{ totalNum }}件商品</div>
<div class="priceBox"> <div class="priceBox">
<span class="paid_in">实付</span> <span class="paid_in">实付</span>
<span class="money">{{ totalPrice }}</span> <span class="money">{{ Utils.isInteger(totalPrice) }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<div class="total"> <div class="total">
<div class="the_sum"> <div class="the_sum">
<span class="name">合计</span> <span class="name">合计</span>
<span class="price">{{ totalPrice }}</span> <span class="price">{{ Utils.isInteger(totalPrice) }}</span>
</div> </div>
<!-- <div class="sun"> <!-- <div class="sun">
<div class="price">总优惠¥{{ reduction }}</div> <div class="price">总优惠¥{{ reduction }}</div>
...@@ -163,7 +163,8 @@ export default { ...@@ -163,7 +163,8 @@ export default {
payType: '1', payType: '1',
duration: '', duration: '',
loginInfo: '', loginInfo: '',
BottomSafeHeight:0 BottomSafeHeight:0,
Utils
} }
}, },
computed: { computed: {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{ {
"path": "pages/areaSelect/areaSelect", "path": "pages/areaSelect/areaSelect",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "选择门店",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
......
...@@ -188,10 +188,17 @@ export default { ...@@ -188,10 +188,17 @@ export default {
changeHandler() { }, changeHandler() { },
confirm(res) { confirm(res) {
const { value } = res; const { value } = res;
console.log(value)
const areaName = {
proviceName:value[0]&&value[0].name,
cityName:value[1]&&value[1].name,
disName:value[2]&&value[2].name
}
const shops = value[2].shops; const shops = value[2].shops;
this.show = false; this.show = false;
// console.log(shops); // console.log(shops);
uni.setStorageSync('shops', shops); uni.setStorageSync('shops', shops);
uni.setStorageSync('areaName', areaName);
uni.navigateTo({ url: '/menuSubPackage/pages/areaSelect/areaSelect' }) uni.navigateTo({ url: '/menuSubPackage/pages/areaSelect/areaSelect' })
}, },
// 手机号授权登录 // 手机号授权登录
...@@ -448,6 +455,7 @@ export default { ...@@ -448,6 +455,7 @@ export default {
line-height: 34rpx; line-height: 34rpx;
letter-spacing: 0rpx; letter-spacing: 0rpx;
text-shadow: -2px -2px 4px rgba(102, 102, 102, 0.1); text-shadow: -2px -2px 4px rgba(102, 102, 102, 0.1);
white-space: nowrap;
.time { .time {
font-size: 32rpx; font-size: 32rpx;
......
...@@ -5,68 +5,67 @@ ...@@ -5,68 +5,67 @@
<!-- <image class="logImg" src="/static/imgs/hooloo.png"></image> --> <!-- <image class="logImg" src="/static/imgs/hooloo.png"></image> -->
<!-- <view class="logText">未 来 咖 啡</view> --> <!-- <view class="logText">未 来 咖 啡</view> -->
</view> </view>
<video autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/17/a2aaece8ad026.mp4"></video> <video class="video" autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/17/a2aaece8ad026.mp4"></video>
</view> </view>
<view v-if="userms" class="mod11 flex-col"> <view v-if="userms" class="mod11">
<view class="box16 flex-col"></view> <view class="box16">
<text class="txt6">{{ userInfo.customerName || '我是谁' }}</text> <image :style="{'width':'100%','height':'100%'}" :src="'../../static/touxiang.png'"></image>
<view class="right_arrow">
<u-icon name="arrow-right" color="#fff" size="14"></u-icon>
</view> </view>
<text class="txt6">{{ userInfo.customerName || '我是谁' }}</text>
</view> </view>
<button class="mod11 flex-col" v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立刻登录</button> <button class="mod11 flex-col" v-else open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">立刻登录</button>
<view class="contents" v-if="userms"> <view class="contents" v-if="userms">
<view class="myOrder" @click="goToPage('order')"> <view class="myOrder" @click="goToPage('order')">
<h3>我的订单</h3> <view class="text">我的订单</view>
<view class="desc">点击查看订单</view> <view><image class="icon" src="/static/imgs/dingdan.png"></image></view>
<view><image class="icon" src="/static/imgs/myOrder.png"></image></view>
</view> </view>
<view class="line"></view>
<view class="right_box"> <view class="right_box">
<view class="box" @click.stop="goToPage('coupon')"> <view class="box" @click.stop="goToPage('coupon')">
<view class="left"> <view class="left">
<h3>HOOLOO券</h3> <h3>HOOLOO券</h3>
<view class="desc">优惠多多不要错过</view>
</view> </view>
<view class="right"><image class="icon" src="/static/imgs/my3.png"></image></view> <view class="right"><image class="icon" src="/static/imgs/youhuijuan.png"></image></view>
</view> </view>
<view class="box two" @click="goToPage('msg')"> <view class="line"></view>
<view class="box_two" @click="goToPage('msg')">
<view class="left"> <view class="left">
<h3>我的消息</h3> <h3>我的消息</h3>
<view class="desc">点击查看我的消息</view>
</view> </view>
<view class="right"><image class="icon" src="/static/imgs/myMail.png"></image></view> <view class="right"><image class="icon" src="/static/imgs/xiaoxi.png"></image></view>
</view> </view>
</view> </view>
</view> </view>
<view class="contents" v-if="!userms"> <view class="contents" v-if="!userms" :style="{'padding-bottom':'65rpx'}">
<button class="myOrder" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="line-height:1.5; margin-left:0rpx; margin-right:0rpx; padding-left:0rpx; padding-right:0rpx;"> <button class="myOrder" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="line-height:1.5; margin-left:0rpx; margin-right:0rpx; padding-left:0rpx; padding-right:0rpx;">
<h3>我的订单</h3> <view class="text">我的订单</view>
<view class="desc">点击查看订单</view> <view><image class="icon" src="/static/imgs/dingdan.png"></image></view>
<view><image class="icon" src="/static/imgs/myOrder.png"></image></view>
</button> </button>
<view class="line"></view>
<view class="right_box"> <view class="right_box">
<button class="box" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="line-height:1.5; margin-left:0rpx; margin-right:0rpx; padding-left:0rpx; padding-right:0rpx;"> <button class="box" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="line-height:1.5; margin-left:0rpx; margin-right:0rpx; padding-left:0rpx; padding-right:0rpx;">
<view class="left"> <view class="left">
<h3>HOOLOO券</h3> <h3>HOOLOO券</h3>
<view class="desc">优惠多多不要错过</view>
</view> </view>
<view class="right"><image class="icon" src="/static/imgs/my3.png"></image></view> <view class="right"><image class="icon" src="/static/imgs/youhuijuan.png"></image></view>
</button> </button>
<button class="box two" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="line-height:1.5; margin-left:0rpx; margin-right:0rpx; padding-left:0rpx; padding-right:0rpx;"> <view class="line"></view>
<button class="box_two" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" style="line-height:1.5; margin-left:0rpx; margin-right:0rpx; padding-left:0rpx; padding-right:0rpx;">
<view class="left"> <view class="left">
<h3>我的消息</h3> <h3>我的消息</h3>
<view class="desc">点击查看我的消息</view>
</view> </view>
<view class="right"><image class="icon" src="/static/imgs/myMail.png"></image></view> <view class="right"><image class="icon" src="/static/imgs/xiaoxi.png"></image></view>
</button> </button>
</view> </view>
</view> </view>
<view v-if="userms" class="function"> <view v-if="userms" class="function">
<h3>常用功能</h3> <view class="title">常用功能</view>
<view class="function_item"> <view class="function_item">
<u-icon name="server-fill" color="#000000" size="16"></u-icon> <u-icon name="server-fill" color="#000000" size="16"></u-icon>
<button class="function_item_text" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">联系客服</button> <button class="function_item_text" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">联系客服</button>
<u-icon name="arrow-right" class="function_item_icon" color="#000000" size="12"></u-icon> <view class="function_item_icon">
<image :style="{'height':'100%','width':'100%'}" v-if="userms" :src="'../../static/imgs/jiantouhei.png'" />
</view>
</view> </view>
</view> </view>
...@@ -137,8 +136,10 @@ button::after { ...@@ -137,8 +136,10 @@ button::after {
.menu-box {} .menu-box {}
.menu-banner { .menu-banner {
height: 376rpx;
position: relative; position: relative;
.video{
height: 437rpx;
}
.log { .log {
position: absolute; position: absolute;
...@@ -166,57 +167,62 @@ button::after { ...@@ -166,57 +167,62 @@ button::after {
} }
.mod11 { .mod11 {
border-radius: 0rpx;
box-sizing: border-box;
padding: 32rpx;
width: 686rpx;
height: 136rpx;
background: #FFFFFF;
backdrop-filter: blur(10px);
margin: 0 auto; margin: 0 auto;
width: 692rpx;
height: 144rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 10rpx;
backdrop-filter: blur(10rpx);
display: flex; display: flex;
align-items: center; justify-content: flex-start;
margin-top: -72rpx; align-items: center;
padding: 0 30rpx; margin-top: -90rpx;
box-sizing: border-box;
color: #fff;
.right_arrow {
margin-left: auto;
}
.txt6 { .txt6 {
margin-left: 20rpx; font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
margin-left: 32rpx;
} }
.box16 { .box16 {
width: 80rpx; width: 72rpx;
height: 80rpx; height: 72rpx;
background: #FF72C1; border-radius: 50%;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(50, 50, 50, 0.25);
border-radius: 4rpx;
} }
} }
.mod11::after{
border-radius: 0rpx;
}
.contents { .contents {
display: flex; display: flex;
padding: 34rpx; padding: 40rpx;
width: 100%; margin: 16rpx 32rpx 26rpx 32rpx;
align-items: center;
justify-content: space-between;
background: #FFFFFF;
// background: #0000FF; // background: #0000FF;
.myOrder { .myOrder {
width: 36%; width: 36%;
height: 270rpx; height: 197rpx;
// background: #FF0000; // background: #FF0000;
background: #FFFFFF; background: #FFFFFF;
border-radius: 10rpx;
align-items: center; align-items: center;
text-align: center; text-align: center;
h3 { .text {
margin-top: 16rpx;
font-size: 28rpx; font-size: 28rpx;
font-family: Arial-BoldMT, Arial; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700; font-weight: 500;
color: #000000; color: #333333;
margin-top: 30rpx;
} }
.desc { .desc {
...@@ -228,28 +234,81 @@ button::after { ...@@ -228,28 +234,81 @@ button::after {
} }
.icon { .icon {
width: 70rpx; width: 72rpx;
height: 80rpx; height: 80rpx;
margin: 0 auto; margin: 0 auto;
margin-top: 50rpx; margin-top: 50rpx;
} }
} }
.line{
height: 197rpx;
background: #E4E4E4;
border: 1rpx solid #E4E4E4;
}
.right_box { .right_box {
margin-left: 20rpx; flex: 1;
// background: #00FF00; // background: #00FF00;
width: 52%; width: 52%;
height: 196rpx;
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
padding-left: 60rpx;
padding-right: 24rpx ;
.two { .box_two {
margin-top: 15rpx; width: 100%;
} overflow: initial;
height: 129rpx;
// background: #FF0000;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
.left {
text-align: center;
width: 154rpx;
h3 {
font-size: 28rpx;
font-family: Arial-BoldMT, Arial;
font-weight: normal;
color: #333333;
}
.desc {
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #323232;
margin-top: 10rpx
}
}
.right {
.icon {
width: 80rpx;
height: 72rpx;
}
}
}
.line {
width: 306rpx;
height: 2rpx;
border: 1rpx solid #E4E4E4;
margin: 30rpx 0rpx;
}
.box { .box {
overflow: initial;
width: 100%; width: 100%;
height: 129rpx; height: 129rpx;
line-height: 30rpx;
// background: #FF0000; // background: #FF0000;
background: #FFFFFF; background: #FFFFFF;
border-radius: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -257,13 +316,13 @@ button::after { ...@@ -257,13 +316,13 @@ button::after {
.left { .left {
text-align: center; text-align: center;
padding-left: 30rpx; width: 154rpx;
h3 { h3 {
font-size: 28rpx; font-size: 28rpx;
font-family: Arial-BoldMT, Arial; font-family: Arial-BoldMT, Arial;
font-weight: 700; font-weight: normal;
color: #000000; color: #333333;
} }
.desc { .desc {
font-size: 20rpx; font-size: 20rpx;
...@@ -275,10 +334,9 @@ button::after { ...@@ -275,10 +334,9 @@ button::after {
} }
.right { .right {
padding-right: 30rpx;
.icon { .icon {
width: 80rpx; width: 80rpx;
height: 55rpx; height: 72rpx;
} }
} }
} }
...@@ -286,18 +344,18 @@ button::after { ...@@ -286,18 +344,18 @@ button::after {
} }
.function { .function {
width: 692rpx; width: 686rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 10rpx; border-radius: 10rpx;
margin: 0 auto; margin: 0 auto;
padding: 25rpx; padding: 22rpx 26rpx;
box-sizing: border-box; box-sizing: border-box;
h3 { .title {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600; font-weight: 500;
color: #000000; color: #333333;
} }
.function_item { .function_item {
...@@ -309,16 +367,19 @@ button::after { ...@@ -309,16 +367,19 @@ button::after {
line-height: 34rpx; line-height: 34rpx;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 20rpx; margin-top: 22rpx;
.function_item_text { .function_item_text {
flex: 1; flex: 1;
margin: 0; margin: 0;
margin-left: 10rpx; margin-left: 16rpx;
padding: 10rpx; padding: 10rpx;
text-align: left; text-align: left;
line-height: 1; line-height: 1;
background-color: #FFFFFF; background-color: #FFFFFF;
font-weight: 400;
color: #333333;
font-family: PingFangSC-Regular, PingFang SC;
font-size: 24rpx; font-size: 24rpx;
border-radius: 0px; border-radius: 0px;
} }
...@@ -330,6 +391,8 @@ button::after { ...@@ -330,6 +391,8 @@ button::after {
.function_item_icon { .function_item_icon {
margin-left: auto; margin-left: auto;
width: 12rpx;
height: 21rpx;
} }
} }
} }
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</div> </div>
<view class="order_footer"> <view class="order_footer">
<view class="total"> <view class="total">
{{ orderDetailsSize(item.orderDetails) }}件商品 合计<text class="price">{{ item.amount }}</text> {{ orderDetailsSize(item.orderDetails) }}件商品 合计<text class="price">{{ Utils.isInteger(item.amount) }}</text>
</view> </view>
<a class="btn" @click.stop="PayNow(item)" v-if="item.state == 1" type="primary">立刻支付</a> <a class="btn" @click.stop="PayNow(item)" v-if="item.state == 1" type="primary">立刻支付</a>
<a class="btn" v-else @click.stop="oneMoreOrder(item)" type="primary">再来一单</a> <a class="btn" v-else @click.stop="oneMoreOrder(item)" type="primary">再来一单</a>
...@@ -88,7 +88,8 @@ export default { ...@@ -88,7 +88,8 @@ export default {
return { return {
empty: false, empty: false,
list: [], list: [],
loginInfo:"" loginInfo:"",
Utils
} }
}, },
onShow() { onShow() {
......
...@@ -65,7 +65,6 @@ export default { ...@@ -65,7 +65,6 @@ export default {
// 业务逻辑。。。 // 业务逻辑。。。
}, },
fail: function (err) { fail: function (err) {
console.log(context)
context.showToast({ context.showToast({
title: '支付失败', title: '支付失败',
icon: 'error', icon: 'error',
......
import Config from '../static/config/index.js'; import Config from '../static/config/index.js';
import WXBizDataCrypt from './WXBizDataCrypt.js'; import WXBizDataCrypt from './WXBizDataCrypt.js';
import context from '../main.js'
import { $EventBus } from './EventBus'; import { $EventBus } from './EventBus';
export default { export default {
...@@ -51,7 +52,7 @@ export default { ...@@ -51,7 +52,7 @@ export default {
if(!unCheckCount) { if(!unCheckCount) {
let countOfOrder = uni.getStorageSync('countOfOrder'); let countOfOrder = uni.getStorageSync('countOfOrder');
if (size >= countOfOrder) { if (size >= countOfOrder) {
uni.showToast({ context.showToast({
title: '最多可一次购买'+countOfOrder+'杯', title: '最多可一次购买'+countOfOrder+'杯',
icon: 'none', icon: 'none',
}); });
...@@ -159,4 +160,12 @@ export default { ...@@ -159,4 +160,12 @@ export default {
return (Math.round(Number(data) * Math.pow(10, fixed)) / Math.pow(10, fixed)).toFixed(fixed); return (Math.round(Number(data) * Math.pow(10, fixed)) / Math.pow(10, fixed)).toFixed(fixed);
} }
}, },
isInteger(value) {
const val = Number(value)
if(val%1 === 0){
return parseInt(val)
}else{
return val.toFixed(1)
}
}
}; };
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