Commit 9995ec5b by songbingqi

修复我的页面优惠券列表ios异常问题

parent bc52288d
<template> <template>
<view class="all"> <view class="all" :key="KEYindex">
<view class="part" :style="{'margin-bottom':indexValue?'200rpx':'0rpx'}"> <view class="part" :style="{'margin-bottom':indexValue?'200rpx':'0rpx'}">
<view class="partOne"> <view class="partOne">
<view class="one_left"> <view class="one_left">
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
export default { export default {
props:{ props:{
indexValue:[Boolean], indexValue:[Boolean],
KEYindex:[Number],
type:{ type:{
type:String, type:String,
default(){ default(){
...@@ -285,6 +286,7 @@ export default { ...@@ -285,6 +286,7 @@ export default {
background: #0050F6; background: #0050F6;
border-radius: 2rpx; border-radius: 2rpx;
font-size: 24rpx; font-size: 24rpx;
z-index: 999;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
...@@ -296,6 +298,7 @@ export default { ...@@ -296,6 +298,7 @@ export default {
background: #999999; background: #999999;
border-radius: 2rpx; border-radius: 2rpx;
font-size: 24rpx; font-size: 24rpx;
z-index: 999;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<swiper :current="current" class="swiper" @change="swiperChange"> <swiper :current="current" class="swiper" @change="swiperChange">
<swiper-item> <swiper-item>
<view class="list" v-if="canuse.length!=0"> <view class="list" v-if="canuse.length!=0">
<scroll-view class="A" scroll-y>
<Ticket v-for="(item,index) in canuse" :key="index" :info="item"/> <Ticket v-for="(item,index) in canuse" :key="index" :info="item"/>
</scroll-view>
</view> </view>
<view class="emty" v-else> <view class="emty" v-else>
<view class="text">暂无可用优惠券</view> <view class="text">暂无可用优惠券</view>
...@@ -13,7 +15,9 @@ ...@@ -13,7 +15,9 @@
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
<view class="list" v-if="cantuse.length!=0"> <view class="list" v-if="cantuse.length!=0">
<scroll-view class="B" scroll-y>
<Ticket v-for="(item,index) in cantuse" :key="index" :info="item" /> <Ticket v-for="(item,index) in cantuse" :key="index" :info="item" />
</scroll-view>
</view> </view>
<view class="emty" v-else> <view class="emty" v-else>
<view class="text">暂无可用优惠券</view> <view class="text">暂无可用优惠券</view>
...@@ -111,11 +115,20 @@ export default { ...@@ -111,11 +115,20 @@ export default {
.bigBox { .bigBox {
.swiper { .swiper {
background: #F8F8F8; background: #F8F8F8;
height: calc(100vh - 64rpx); height: calc(100vh - 90rpx);
.list{ .list{
.A {
max-height: calc(100vh - 90rpx);
overflow-y: scroll;
}
.B {
max-height: calc(100vh - 90rpx);
overflow-y: scroll;
}
height: 100%; height: 100%;
padding: 0rpx 32rpx; padding: 0rpx 32rpx;
overflow-y: scroll; padding-bottom: 32rpx;
} }
.emty{ .emty{
.text{ .text{
......
...@@ -136,8 +136,12 @@ import { $EventBus } from "@/utils/EventBus"; ...@@ -136,8 +136,12 @@ import { $EventBus } from "@/utils/EventBus";
export default { export default {
mixins: [systemInfo], mixins: [systemInfo],
onLoad(option) { onLoad(option) {
this.Authorization = uni.getStorageSync('Authorization')
this.initData(option) this.initData(option)
}, },
onShow() {
this.backToMneu = false
},
onUnload(){ onUnload(){
this.goBack() this.goBack()
}, },
...@@ -149,7 +153,8 @@ export default { ...@@ -149,7 +153,8 @@ export default {
isBuild:true, isBuild:true,
waitTime:0, waitTime:0,
backFlag:false, backFlag:false,
backToMneu:false backToMneu:false,
Authorization:''
} }
}, },
methods: { methods: {
...@@ -179,6 +184,7 @@ export default { ...@@ -179,6 +184,7 @@ export default {
this.goBack() this.goBack()
}, },
goBack(){ goBack(){
console.log(this.backToMneu,'backToMneu')
if(this.backFlag){ if(this.backFlag){
if(this.backToMneu){ if(this.backToMneu){
uni.switchTab({ url: '/pages/menu/menu' }) uni.switchTab({ url: '/pages/menu/menu' })
...@@ -230,16 +236,18 @@ export default { ...@@ -230,16 +236,18 @@ export default {
this.option = JSON.stringify(option) this.option = JSON.stringify(option)
const { orderId = '',from = '' } = option const { orderId = '',from = '' } = option
// 从结算进入 // 从结算进入
console.log(from)
if(from==='settlement'){ if(from==='settlement'){
this.backToMneu = true this.backToMneu = true
} }
// 从订阅消息进入 // 从订阅消息进入
let Authorization = uni.getStorageSync('Authorization') let Authorization = uni.getStorageSync('Authorization')
console.log(this.userms,'userms')
console.log(this.Authorization,'Authorization')
if(orderId){ if(orderId){
console.log(!Authorization,Authorization) if(!this.userms&&!this.Authorization){
if(!Authorization){
this.backFlag = true this.backFlag = true
this.goBack() uni.switchTab({ url: '/pages/order/order' })
return return
}else{ }else{
this.backFlag = false this.backFlag = false
......
...@@ -120,8 +120,9 @@ import User from '@/request/user' ...@@ -120,8 +120,9 @@ import User from '@/request/user'
import Order from '@/request/order' import Order from '@/request/order'
export default { export default {
onShow() { onShow() {
console.log('show') this.goods = uni.getStorageSync('goodsList') || [];
if (this.goods) { console.log('show',this.goods)
if (JSON.stringify(this.goods)!="{}") {
Order.getWaitTine({ Order.getWaitTine({
shopId: uni.getStorageSync('shopData').id, shopId: uni.getStorageSync('shopData').id,
goods: this.goods goods: this.goods
......
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