Compare commits

..

No commits in common. "b40921054625e39aca23e964f0df1f76a98d6769" and "2e4184429a4187d6d69201ce49acc6ef5ad4a7fb" have entirely different histories.

6 changed files with 22 additions and 83 deletions

View File

@ -42,7 +42,7 @@
{
"path": "pages/shop/pay",
"style": {
"navigationStyle": "custom"
"navigationBarTitleText": "收银台"
}
},
{
@ -53,14 +53,9 @@
},
{
"path" : "pages/main/login",
"style": {
"navigationStyle": "custom"
}
},
{
"path" : "pages/main/order",
"style": {
"navigationStyle": "custom"
"style" :
{
"navigationBarTitleText" : ""
}
}
],

View File

@ -1,27 +0,0 @@
<template>
<view>
<!-- topbar -->
<u-navbar title="订单查询" bgColor="#d43030" :titleStyle="{ color: '#FFF'}" :autoBack="true" placeholder>
<view class="u-nav-slot" slot="left">
<u-icon name="arrow-left" color="#fff" size="19"></u-icon>
</view>
</u-navbar>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@ -72,11 +72,10 @@
<view v-else class="bg-m rad16 flex" style="height: 108rpx;">
<view class="flex md p-b-12">
<u--image src="/static/icons/planeBox-100.svg" width="136rpx" height="136rpx"
@click="$store.commit('setCartShow',!$store.state.cartShow)" />
@click="$store.state.cartShow = !$store.state.cartShow" />
</view>
<view class="fci fz36 flex1 flex msb">
<view class="flex1 p-l-12 flex column mc"
@click="$store.commit('setCartShow',!$store.state.cartShow)">
<view class="flex1 p-l-12 flex column mc" @click="$store.state.cartShow = !$store.state.cartShow">
<view class="fz36 fb">¥{{total | formatPrice}}</view>
<view class="fz24" v-if="minimumOrderDifference>0">还差¥{{minimumOrderDifference | formatPrice}}起送
</view>
@ -187,13 +186,13 @@
// resnull
if (!res) {
setTimeout(() => {
this.getElRect(elClass)
this.getElRect(elClass);
}, 10)
return
}
this[dataVal] = res.height
this[dataVal] = res.height;
resolve()
}).exec()
}).exec();
})
},
//
@ -263,22 +262,21 @@
// height2
if (!height2 || scrollHeight >= height1 && scrollHeight < height2) {
this.leftMenuStatus(i)
return
return;
}
}
}, 10)
},
//""
handleSeled() {
const regex = /^(\+?\d{1,4}[\s-]?)?\d{3}\*{4}\d{4}$/
if (regex.test(this.$store.state.userInfo.tel)) { //
uni.navigateTo({ //
url: '/pages/shop/order'
})
} else { //
uni.navigateTo({ //
if (!this.$store.state.userInfo.tel) { //
uni.navigateTo({
url: '/pages/main/getTel'
})
} else { //
uni.navigateTo({
url: '/pages/shop/order'
})
}
}
},

View File

@ -44,8 +44,8 @@
<text class="fz24">合计</text>
<text class="fz44">¥{{total | formatPrice}}</text>
</view>
<view class="fz32 flex column mac mc fci rad16 m-r-24" style="width:220rpx;height:100rpx;"
@click="handleCheckout" :class="isPressed?'bg-g':'bg-m'">
<view class="fz32 bg-m flex column mac mc fci rad16 m-r-24" style="width:220rpx;height:100rpx;"
@click="handleCheckout">
<view>提交订单</view>
<view>Checkout</view>
</view>
@ -64,7 +64,6 @@
export default {
data() {
return {
isPressed: false, //
remark: '' //
}
},
@ -91,10 +90,6 @@
totalPrice,
//
handleCheckout() {
if (this.isPressed) {//
return
}
this.isPressed = true
//
uni.$u.http.post('/Api/Check/checkout', {
cartList: JSON.stringify(this.cartList), //
@ -110,11 +105,9 @@
}).then(res => {
//
if (res.data.status === 1) {
//
this.$store.commit('clearCartList')
//
const order_sn = res.data.order_sn;
uni.navigateTo({
url: `/pages/shop/pay?order_sn=${res.data.order_sn}`
url: `/pages/shop/pay?order_sn=${order_sn}`
});
} else if (res.data.status === -1) {
uni.removeStorage({ //
@ -131,7 +124,6 @@
title: res.data.msg,
icon: 'error'
})
this.isPressed = false
}
})
}
@ -141,12 +133,7 @@
formatPrice, //
},
onShow() {
//
if (this.$store.state.cartList.length === 0) {
uni.redirectTo({
url: '/pages/main/order'
})
}
}
}
</script>

View File

@ -1,12 +1,6 @@
<template>
<view>
<!-- topbar -->
<u-navbar title="收银台" bgColor="#d43030" :titleStyle="{ color: '#FFF'}" :autoBack="true" placeholder>
<view class="u-nav-slot" slot="left">
<u-icon name="arrow-left" color="#fff" size="19"></u-icon>
</view>
</u-navbar>
<button @click="pay" type="primary" style="margin-top:200rpx;">确认支付</button>
<button @click="pay">确认支付</button>
</view>
</template>

View File

@ -43,10 +43,6 @@ const store = new Vuex.Store({
},
//修改状态
mutations: {
//设置 列表页 购物车折叠显隐
setCartShow(state,val){
Vue.set(state,'cartShow', val)
},
//设置 标记用户登录状态
setMqttState(state,val){
Vue.set(state,'mqttState', val)
@ -93,10 +89,6 @@ const store = new Vuex.Store({
setShopCon(state, obj) {
state.shopCon = obj
},
//清空购物车
clearCartList(state){
Vue.set(state,'cartList', [])
},
// 设置购物车列表
setCartList(state, obj) {
let isExisting = false