相关接口添加ticketType字段

修改ztabs组件
调整接口
main
Tuzki 7 months ago
parent 8015005309
commit d8b8c5b0c5
  1. 5
      api/seal/seal.js
  2. 2
      pages/orderDetail/orderDetail.vue
  3. 3
      pages/shoppingCar/shoppingCar.vue
  4. 28
      pages/shoppingTrolley/shoppingTrolley.vue
  5. 2
      store/modules/user.js
  6. 5
      uni_modules/z-tabs/components/z-tabs/z-tabs.vue
  7. 5
      utils/storage.js

@ -8,10 +8,11 @@ export function getIndexData() {
})
}
// 获取门票分类
export function getTicketSortList() {
export function getTicketSortList(params) {
return request({
url: '/handset/ticket/getTicketSortList',
'method': 'GET'
'method': 'GET',
params:params
})
}
//手持售票列表分页

@ -228,7 +228,7 @@
submitOrder(obj).then((res) => {
console.log('支付结果', res)
const data = res.data;
if (data.status === 10) {
if (data.status === 0) {
that.clearQueryInterval();
uni.showToast({
icon: 'none',

@ -236,7 +236,8 @@ export default {
num: item.num,
ticketPrice: item.settlementPrice,
date: item.date,
visitorInfoList: item.visitorInfoList
visitorInfoList: item.visitorInfoList,
ticketType:item.ticketType
})
});

@ -7,10 +7,10 @@
<!-- 注意此处的z-tabs为独立的组件可替换为第三方的tabs若需要使用z-tabs请在插件市场搜索z-tabs并引入否则会报插件找不到的错误 -->
<template #top>
<view class="m-btn-group">
<button >景区门票</button>
<button >游玩套票</button>
<button @click="ticketType = 1">景区门票</button>
<button @click="ticketType = 3">游玩套票</button>
</view>
<z-tabs :activeStyle="activeStyle" :list="tabList" @change="tabChange" valueKey="id"
<z-tabs ref="zTab" :activeStyle="activeStyle" :list="tabList" @change="tabChange" valueKey="id"
:inactive-color="'rgba(27, 27, 27, 1)'" :bgColor="'transparent'" />
</template>
@ -123,6 +123,7 @@
return {
//v-model
dataList: [],
ticketType:1,
tabList: [],
car: [],
ticketsort: null,
@ -193,6 +194,15 @@
}
},
immediate:true
},
ticketType:{
handler(oval,nval){
if(oval!=nval){
this.getTicketSortList()
this.$refs.paging.reload(true);
this.$refs.zTab.updateSubviewLayout()
}
}
}
},
onShow() {
@ -628,7 +638,9 @@
//
changeStatus() {
this.queryStatus = 1;
this.$refs.paging.reload(true);
if(this.$refs.paging){
this.$refs.paging.reload(true);
}
},
//
clearStatus() {
@ -637,7 +649,10 @@
},
//
getTicketSortList() {
getTicketSortList()
let params={
ticketType:this.ticketType
}
getTicketSortList(params)
.then((res) => {
res.data.forEach((item) => {
item.name = item.sortName;
@ -904,7 +919,8 @@
pageSize: pageSize,
ticketsort: this.ticketsort,
queryStatus: this.queryStatus,
distributionChannel: 3
distributionChannel: 3,
ticketType:this.ticketType,
};
getTicketList(params)
.then((res) => {

@ -85,7 +85,7 @@ const user = {
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
removeToken()
storage.clean()
storage.cleanAll()
resolve()
}).catch(error => {
reject(error)

@ -281,7 +281,8 @@
handler(newVal) {
this._handleListChange(newVal);
},
immediate: false
immediate: false,
deep: true
},
bottomDotX(newVal) {
if(newVal >= 0){
@ -419,6 +420,7 @@
},
//z-tabs
updateSubviewLayout(tryCount = 0) {
this.$nextTick(() => {
let delayTime = 10;
// #ifdef APP-NVUE || MP-BAIDU
@ -427,6 +429,7 @@
setTimeout(() => {
this._getNodeClientRect('.z-tabs-scroll-view-conatiner').then(res=>{
if (res){
if (!res[0].width && tryCount < 10) {
setTimeout(() => {
tryCount ++;

@ -27,7 +27,10 @@ const storage = {
},
clean: function() {
uni.removeStorageSync(storageKey)
}
},
cleanAll:function(){
uni.clearStorageSync();
}
}
export default storage

Loading…
Cancel
Save