Browse Source

瀑布流bug优化 隐藏优惠券 修改确认核销页面

test
Enzo 4 years ago
parent
commit
ef4a0eb257
  1. 45
      components/lf-waterfall-recom/lf-waterfall.vue
  2. 4
      pages/hot/index.vue
  3. 4
      pages/order/confirm_order.vue
  4. 4
      pages/order/order_details.vue
  5. 4
      pages/order/unpay_details.vue
  6. 9
      pages/recommList/index.vue
  7. 19
      pages/verification/index.vue

45
components/lf-waterfall-recom/lf-waterfall.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<u-waterfall v-model="dataList" ref="uWaterfall">
<u-waterfall v-model="dataList" ref="uWaterfall" v-for="itemFather of listlength" :key="itemFather" v-if="itemFather == tabindex">
<template v-slot:left="{leftList}"> <template v-slot:left="{leftList}">
<view class="list-warter" v-for="(item, index) in leftList" :key="index"> <view class="list-warter" v-for="(item, index) in leftList" :key="index">
<view v-if="!item.is_ad" @click="onClick(item.id)"> <view v-if="!item.is_ad" @click="onClick(item.id)">
@ -65,21 +65,51 @@
list: { list: {
type: Array, type: Array,
default: [] default: []
},
tabindex: {
type: Number,
default: 0
},
listlength: {
type: Number,
default: 1
} }
}, },
data(){ data(){
return { return {
dataList: []
} }
}, },
computed: { computed: {
dataList: {
get() { return this.list; },
set(newValue) { console.log('newvalue',newValue) }
},
// dataList: {
// get() {
// console.log('====',this.list)
// return this.list;
// },
// set(newValue) { console.log('newvalue',newValue) }
// },
},
watch: {
list(newValue,oldValue) {
console.log('值变了',newValue)
console.log('旧值',this.$refs)
// this.$forceUpdate();
this.dataList = newValue
console.log('当前值',this.dataList)
return newValue
}
}, },
onShow(){ onShow(){
},
deactivated() {
},
onLoad() {
}, },
destroyed() { destroyed() {
@ -99,7 +129,8 @@
} }
}, },
clear() { clear() {
this.$refs.uWaterfall.clear();
console.log('组件名',this.$refs)
this.$refs.uWaterfall[0].clear();
} }
} }
} }

4
pages/hot/index.vue

@ -7,8 +7,8 @@
<image :src="item.picture" class="lf-w-100 lf-h-100" mode="aspectFill"></image> <image :src="item.picture" class="lf-w-100 lf-h-100" mode="aspectFill"></image>
</view> </view>
<view style="width: 420rpx;"> <view style="width: 420rpx;">
<view class="lf-font-28 lf-color-333 lf-line-2" style="height: 78rpx;">{{item.title}}</view>
<view class="lf-font-24 lf-color-gray lf-line-2" style="height: 64rpx;">本套票只包含两个成人不可带小孩本套票只包含两个成人不可带小孩本套票只包含两个成人不可带小孩</view>
<view class="lf-font-28 lf-color-333 lf-line-2">{{item.title}}</view>
<view class="lf-font-24 lf-color-gray lf-line-2 lf-m-t-10" style="min-height: 64rpx;">本套票只包含两个成人不可带小孩本套票只包含两个成人不可带小孩本套票只包含两个成人不可带小孩</view>
<view class="lf-flex lf-m-t-25"> <view class="lf-flex lf-m-t-25">
<lf-price :price="item.price"></lf-price> <lf-price :price="item.price"></lf-price>
<text class="lf-font-24 lf-color-gray lf-line-through lf-m-l-15">¥{{item.original_price}}</text> <text class="lf-font-24 lf-color-gray lf-line-through lf-m-l-15">¥{{item.original_price}}</text>

4
pages/order/confirm_order.vue

@ -21,7 +21,7 @@
</view> </view>
</view> </view>
</view> </view>
<self-line/>
<!-- <self-line/>
<view class="bg-white"> <view class="bg-white">
<view class="cu-bar padding-lr"> <view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">优惠</text> <text class="lf-color-555 lf-font-28">优惠</text>
@ -32,7 +32,7 @@
<text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text> <text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text>
</view> </view>
</view> </view>
</view>
</view> -->
<self-line/> <self-line/>
<view class="bg-white" v-if="enter_type!=1"> <view class="bg-white" v-if="enter_type!=1">
<view class="cu-bar padding-lr solid-bottom"> <view class="cu-bar padding-lr solid-bottom">

4
pages/order/order_details.vue

@ -49,7 +49,7 @@
</view> </view>
</view> </view>
<self-line />
<!-- <self-line />
<view class="bg-white"> <view class="bg-white">
<view class="cu-bar padding-lr"> <view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">优惠</text> <text class="lf-color-555 lf-font-28">优惠</text>
@ -60,7 +60,7 @@
<text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text> <text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text>
</view> </view>
</view> </view>
</view>
</view> -->
<view> <view>
<self-line /> <self-line />

4
pages/order/unpay_details.vue

@ -44,7 +44,7 @@
</view> </view>
</view> </view>
<self-line />
<!-- <self-line />
<view class="bg-white"> <view class="bg-white">
<view class="cu-bar padding-lr"> <view class="cu-bar padding-lr">
<text class="lf-color-555 lf-font-28">优惠</text> <text class="lf-color-555 lf-font-28">优惠</text>
@ -55,7 +55,7 @@
<text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text> <text class="lf-color-price lf-font-28 lf-m-l-10">暂无优惠</text>
</view> </view>
</view> </view>
</view>
</view> -->
<view> <view>
<self-line /> <self-line />

9
pages/recommList/index.vue

@ -8,7 +8,7 @@
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex"> <swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex">
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh"> <scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="tabItem.isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh">
<view class="lf-m-t-20"></view> <view class="lf-m-t-20"></view>
<lf-waterfall :list="tabItem.list" ref="uWaterfall"></lf-waterfall>
<lf-waterfall :list="tabItem.list" :listlength="tab_list.length" :tabindex='tabIndex' ref="uWaterfallFather"></lf-waterfall>
<view class="loading-more lf-m-b-10"> <view class="loading-more lf-m-b-10">
<text :class="{'loading-more-text': tabItem.loadingClass}" v-if="tabItem.list.length">{{tabItem.loadingText}}</text> <text :class="{'loading-more-text': tabItem.loadingClass}" v-if="tabItem.list.length">{{tabItem.loadingText}}</text>
<lf-nocontent v-else></lf-nocontent> <lf-nocontent v-else></lf-nocontent>
@ -91,6 +91,10 @@
}, },
tabChange(index){ tabChange(index){
this.current = index; this.current = index;
this.clearTabItem()
console.log(this.$refs)
console.log('当前数据',this.tab_list[index])
console.log('组件中的数据',this.$refs.uWaterfallFather[this.current].dataList)
if(this.tab_list[index].list.length <= 0){ if(this.tab_list[index].list.length <= 0){
this.getData(); // tab this.getData(); // tab
} }
@ -127,7 +131,8 @@
tab_item.loadingText = '正在加载中'; tab_item.loadingText = '正在加载中';
tab_item.list = []; tab_item.list = [];
this.$set(this.tab_list, this.current, tab_item); this.$set(this.tab_list, this.current, tab_item);
this.$refs.uWaterfall[this.current].clear();
this.$refs.uWaterfallFather[this.current].clear();
console.log('当前方法删除',this.$refs.uWaterfallFather[this.current])
} }
} }
} }

19
pages/verification/index.vue

@ -1,8 +1,8 @@
<template> <template>
<view class="lf-p-40">
<view class="lf-row-center lf-font-28">确认核销权限...</view>
<button class="cu-btn lf-bg-white lf-m-t-30" style="border: 1px solid #1998FE;" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<text class="lf-font-32 lf-color-blue">确认核销</text>
<view class="lf-p-40 lf-w-100 lf-h-100 lf-row-center" style="height: 1200rpx;">
<!-- <view class="lf-row-center lf-font-28">确认核销权限...</view> -->
<button class="cu-btn lf-m-t-30" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<text class="lf-font-32">确认核销</text>
</button> </button>
</view> </view>
</template> </template>
@ -30,7 +30,6 @@
// //
getPhoneNumber(event){ getPhoneNumber(event){
if(this.userInfo.mobile == '') { if(this.userInfo.mobile == '') {
console.log('需绑定手机号')
if(event.detail.errMsg == 'getPhoneNumber:ok'){ if(event.detail.errMsg == 'getPhoneNumber:ok'){
let encryptedData = event.detail.encryptedData; let encryptedData = event.detail.encryptedData;
let iv = event.detail.iv; let iv = event.detail.iv;
@ -53,12 +52,18 @@
this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => { this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
this.$msg('核销成功!'); this.$msg('核销成功!');
}); });
console.log('无需绑定手机号')
} }
}, },
} }
} }
</script> </script>
<style>
<style scoped>
.cu-btn {
width: 260rpx;
height: 260rpx;
border-radius: 50%;
background-color: #1998FE;
color: white;
}
</style> </style>
Loading…
Cancel
Save