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