门店购物车显示

main
yangsai 4 weeks ago
parent a59f1d971b
commit a40e286db1
  1. 2
      pages/goods_cate/template/template3.vue
  2. 5
      pages/goods_details/index.vue
  3. 6
      pages/index/index.vue
  4. 17
      pages/store/table_code/cart.vue

@ -10,7 +10,7 @@
<view class="w-full h-58 flex-y-center rd-30rpx bg--w111-f5f5f5 px-32" @tap="goSearch"> <view class="w-full h-58 flex-y-center rd-30rpx bg--w111-f5f5f5 px-32" @tap="goSearch">
<!-- #endif --> <!-- #endif -->
<text class="iconfont icon-ic_search fs-28"></text> <text class="iconfont icon-ic_search fs-28"></text>
<text class="fs-24 pl-18">请输入商品名称3</text> <text class="fs-24 pl-18">请输入商品名称</text>
</view> </view>
<!-- 胶囊占据的位置 --> <!-- 胶囊占据的位置 -->
<!-- #ifdef MP --> <!-- #ifdef MP -->

@ -958,7 +958,10 @@
onShareAppMessage: function() { onShareAppMessage: function() {
let that = this; let that = this;
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden); that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
if (this.isLogin) {
userShare(); userShare();
}
return { return {
title: that.storeInfo.store_name || '', title: that.storeInfo.store_name || '',
imageUrl: that.storeInfo.image || '', imageUrl: that.storeInfo.image || '',
@ -968,7 +971,9 @@
onShareTimeline() { onShareTimeline() {
let that = this; let that = this;
that.$set(that, 'actionSheetHidden', !that.actionSheetHidden); that.$set(that, 'actionSheetHidden', !that.actionSheetHidden);
if (this.isLogin) {
userShare(); userShare();
}
return { return {
title: that.storeInfo.store_name || '', title: that.storeInfo.store_name || '',
imageUrl: that.storeInfo.image || '', imageUrl: that.storeInfo.image || '',

@ -5,9 +5,7 @@
<view class="xuanzmd"> <view class="xuanzmd">
<text @click="xuzemd">{{mrmd}}</text> <text @click="xuzemd">{{mrmd}}</text>
<uni-icons type="right" size="16" color="white"></uni-icons> <uni-icons type="right" size="16" color="white"></uni-icons>
<text class="sytitle" >首页</text> <text class="sytitle" @click="saoma">首页</text>
<text class="sytitle" @click="goUrl(1)">座位预定</text>
<text class="sytitle" @click="goUrl(2)">存取酒</text>
</view> </view>
<!-- <view class="input-container"> <!-- <view class="input-container">
<input class="inputserch" placeholder="搜索喜欢的商品" prefixIcon="search" v-model="searchValue"/> <input class="inputserch" placeholder="搜索喜欢的商品" prefixIcon="search" v-model="searchValue"/>
@ -506,7 +504,7 @@
methods: { methods: {
saoma(){ saoma(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/store/table_code/index?store_id=1&qrcode_id=14', url:'/pages/store/table_code/index?store_id=1&qrcode_id=115',
}) })
}, },
onInput(e){ onInput(e){

@ -413,9 +413,15 @@
}, },
// //
subOrder: function() { subOrder: function() {
this.getCartList(1);
if(!uni.getStorageSync('pay_vip_status')){ if(!uni.getStorageSync('pay_vip_status')){
this.$refs.popup.open('center') this.$refs.popup.open('center')
}else{ }else{
uni.showModal({
title: '确定下单吗?',
content: '下单后购物车商品将不能操作',
success: (res) => {
if (res.confirm) {
placeOrder({ placeOrder({
tableId: this.info.tableId, tableId: this.info.tableId,
storeId: this.info.store_id, storeId: this.info.store_id,
@ -429,6 +435,9 @@
}); });
}); });
} }
}
});
}
}, },
// //
getTotalPrice: function() { getTotalPrice: function() {
@ -494,9 +503,10 @@
getCartLists() { getCartLists() {
console.log('this.footerOpen',this.footerOpen); console.log('this.footerOpen',this.footerOpen);
if (this.footerOpen) { if (this.footerOpen) {
this.getCartList(); this.getCartList(1);
} else { } else {
this.footerOpen = true; this.footerOpen = true;
this.getCartList(1);
} }
}, },
getCartList(iSshow) { getCartList(iSshow) {
@ -511,7 +521,8 @@
}).then(res => { }).then(res => {
that.$set(that.cartData, 'cartList', res.data); that.$set(that.cartData, 'cartList', res.data);
if (res.data.length) { if (res.data.length) {
that.$set(that.cartData, 'iScart', iSshow ? false : !that.cartData.iScart); that.$set(that.cartData, 'iScart', iSshow);
that.footerOpen = true;
} else { } else {
that.$set(that.cartData, 'iScart', false); that.$set(that.cartData, 'iScart', false);
} }
@ -818,7 +829,7 @@
} }
that.getCartNum(); that.getCartNum();
if (!cart) { if (!cart) {
that.getCartList(1); that.getCartList();
} }
}).catch(err => { }).catch(err => {
that.$util.Tips({ that.$util.Tips({

Loading…
Cancel
Save