Commit e1a512ac by songbingqi

修复部分bug

parent 55317e68
<template> <template>
<div> <div>
<u-popup :show="show" :round="10" mode="bottom" @close="close" :safeAreaInsetBottom="false" zIndex="10078" :customStyle="popupStyle"> <u-popup :show="show" :round="10" mode="bottom" @close="close" zIndex="10078" :customStyle="popupStyle">
<view class="bigBox" :style="{'margin-top':'-20rpx'}" @touchstart="start" @touchmove.stop.prevent="move" @touchend="end" ref="op"> <view class="bigBox" :style="{'margin-top':'-20rpx'}" @touchstart="start" @touchmove.stop.prevent="move" @touchend="end" ref="op">
<scroll-view class="scroll-view" :scroll-y="true"> <scroll-view class="scroll-view" :scroll-y="true">
<div class="order_flow" > <div class="order_flow" >
......
...@@ -188,14 +188,15 @@ export default { ...@@ -188,14 +188,15 @@ export default {
async cart(item, category){ async cart(item, category){
console.log(item,category) console.log(item,category)
const skuStatus = item.skus.filter(item=>{return Number(item.state)===1}) const skuStatus = item.skus.filter(item=>{return Number(item.state)===1})
const {data} = await Order.checkSku({skuId:item.skus[0].skuId})
const {goods} = data.data
if(skuStatus.length===0){ if(skuStatus.length===0){
this.showToast({ this.showToast({
title: '该商品已售罄', title: '该商品已售罄',
icon: 'none', icon: 'none',
}) })
}else{ }else{
const {data} = await Order.checkSku({skuId:item.skus[0].skuId})
const {goods} = data.data
console.log(goods) console.log(goods)
uni.setStorageSync('goodsInfo', JSON.stringify({ ...goods, category })); uni.setStorageSync('goodsInfo', JSON.stringify({ ...goods, category }));
uni.navigateTo({ url: '/menuSubPackage/pages/goodsDetail/goodsDetail' }) uni.navigateTo({ url: '/menuSubPackage/pages/goodsDetail/goodsDetail' })
......
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
onLoad(option) { onLoad(option) {
this.initData(option) this.initData(option)
}, },
onUnload(){ onHide(){
this.goBack() this.goBack()
}, },
data() { data() {
...@@ -176,13 +176,14 @@ export default { ...@@ -176,13 +176,14 @@ export default {
async initData(option){ async initData(option){
this.getSystemInfo() this.getSystemInfo()
let oId = uni.getStorageSync('orderId'); let oId = uni.getStorageSync('orderId');
console.log(option,'option')
// 从订阅消息进入 // 从订阅消息进入
if(JSON.stringify(option)!=='{}'&&option){ if(JSON.stringify(option)!=='{}'&&option){
this.option = JSON.stringify(option) this.option = JSON.stringify(option)
const { orderId = '' } = option const { orderId = '' } = option
let Authorization = uni.getStorageSync('Authorization') let Authorization = uni.getStorageSync('Authorization')
console.log(Authorization)
if(orderId){ if(orderId){
console.log(!Authorization,Authorization)
if(!Authorization){ if(!Authorization){
this.goBack() this.goBack()
return return
......
<template> <template>
<view class="menu-box"> <view class="menu-box">
<view class="menu-banner" :style="{'height':buied?'360rpx':'450rpx'}"> <view class="menu-banner" :style="{'height':buied?'360rpx':'450rpx'}">
<image :src="'https://s3.bmp.ovh/imgs/2022/07/02/2cfab823b35322e3.gif'"/> <image :src="img?img:'../../static/imgs/shouyezhanweitu.png'"/>
<!-- <video autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966.mp4" /> --> <!-- <video autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/71d36be0ed966.mp4" /> -->
<view class="shop-info" :style="'top:100rpx'"> <view class="shop-info" :style="'top:100rpx'">
<view class="shop-box"> <view class="shop-box">
...@@ -81,7 +81,8 @@ export default { ...@@ -81,7 +81,8 @@ export default {
orderInfo: {},//即将取餐的订单信息 orderInfo: {},//即将取餐的订单信息
classifyData: [], classifyData: [],
customerName: '', customerName: '',
loginInfo:"" loginInfo:"",
img:''
}; };
}, },
computed: { computed: {
...@@ -93,6 +94,7 @@ export default { ...@@ -93,6 +94,7 @@ export default {
}, },
}, },
created() { created() {
this.img = 'https://s3.bmp.ovh/imgs/2022/07/02/2cfab823b35322e3.gif'
}, },
onLoad: async function () { onLoad: async function () {
uni.getSetting({ uni.getSetting({
...@@ -327,7 +329,7 @@ export default { ...@@ -327,7 +329,7 @@ export default {
} }
image { image {
width: 100%; width: 100%;
height: 400rpx; height: 400rpx;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!-- <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>
<image :src="'https://s3.bmp.ovh/imgs/2022/07/05/1768111c5c7f5300.gif'"/> <image :src="img?img:'../../static/imgs/wodezhanweitu.png'"/>
<!-- <video class="video" autoplay muted loop :controls="false" :enable-progress-gesture="false" objectFit='cover' src="http://songclound.oss-cn-hongkong.aliyuncs.com/2022/06/27/e6582afb60924.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/27/e6582afb60924.mp4"></video> -->
<view class="mod11"> <view class="mod11">
<view class="avatar"> <view class="avatar">
...@@ -100,10 +100,12 @@ export default { ...@@ -100,10 +100,12 @@ export default {
this.loginInfo = loginInfo this.loginInfo = loginInfo
}) })
} }
this.img = 'https://s3.bmp.ovh/imgs/2022/07/05/1768111c5c7f5300.gif'
}, },
data() { data() {
return { return {
loginInfo:"" loginInfo:"",
img:''
} }
}, },
computed: { computed: {
......
...@@ -94,7 +94,6 @@ export default { ...@@ -94,7 +94,6 @@ export default {
} }
}, },
onShow() { onShow() {
console.log(1)
this.getList() this.getList()
}, },
mounted() { mounted() {
......
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