修改售票页面仅看可售按钮放到右上角;

等待后台提供游玩套票的接口
main
Tuzki 8 months ago
parent d34c66270b
commit 242620f397
  1. 23
      pages/shoppingTrolley/shoppingTrolley.vue
  2. 16
      uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue

@ -1,14 +1,14 @@
<template>
<view class="m-content">
<uni-nav-bar dark :fixed="true" shadow background-color="#007AFF" status-bar left-icon="left" left-text=""
title="手持售票" @clickLeft="back" />
:showIconText="true" iconText="仅看可售" rightWidth="150rpx" title="手持售票" @clickLeft="back" :right-icon="isChecked?'checkbox':'circle'" @clickRight="toggleCheckbox" />
<z-paging class="z-padding" ref="paging" v-model="dataList" @query="queryList" :style="[{ top: safeHeight() }]">
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" -->
<!-- 注意此处的z-tabs为独立的组件可替换为第三方的tabs若需要使用z-tabs请在插件市场搜索z-tabs并引入否则会报插件找不到的错误 -->
<template #top>
<view class="m-btn-group">
<button @click="changeStatus">可售门票</button>
<button @click="clearStatus">全部商品</button>
<button >景区门票</button>
<button >游玩套票</button>
</view>
<z-tabs :activeStyle="activeStyle" :list="tabList" @change="tabChange" valueKey="id"
:inactive-color="'rgba(27, 27, 27, 1)'" :bgColor="'transparent'" />
@ -149,6 +149,7 @@
event: null,
ITEM: null, //item
isChecked: true, //
};
},
watch: {
@ -182,6 +183,16 @@
this.ticketSumPrice = parseFloat((totalCents / 100).toFixed(2));
}
}
},
isChecked:{
handler(val){
if(val){
this.changeStatus()
}else{
this.clearStatus()
}
},
immediate:true
}
},
onShow() {
@ -915,7 +926,11 @@
this.$refs.paging.complete(false);
});
},
itemClick(item) {}
itemClick(item) {},
toggleCheckbox() {
this.isChecked = !this.isChecked;
console.log('Checkbox is now:', this.isChecked);
},
},
onHide() {
this.$refs.calendar.close();

@ -28,8 +28,9 @@
<view @click="onClickRight" class="uni-navbar__header-btns uni-navbar__header-btns-right"
:style="{width:rightIconWidth}">
<slot name="right">
<view v-if="rightIcon.length">
<view v-if="rightIcon.length" class="flex-align">
<uni-icons :color="themeColor" :type="rightIcon" size="22" />
<text v-if="showIconText" class="uni-nav-bar-right-text" :style="{ color: themeColor}">{{ iconText }}</text>
</view>
<view class="uni-navbar-btn-text" v-if="rightText.length && !rightIcon.length">
<text class="uni-nav-bar-right-text" :style="{ color: themeColor}">{{ rightText }}</text>
@ -139,6 +140,14 @@
stat: {
type: [Boolean, String],
default: ''
},
showIconText:{
type:Boolean,
default:false
},
iconText:{
type:String,
default:''
}
},
computed: {
@ -345,4 +354,9 @@
//
.uni-dark {}
.flex-align{
display: flex;
align-items: center;
}
</style>

Loading…
Cancel
Save