增加商品客服显示
This commit is contained in:
@@ -32,15 +32,20 @@
|
|||||||
<li :class="[lTypeId === lType.id && 'active']" v-for="lType in listTypes" :key="lType.id" @click="getPayRecords(lType.id, 1)">{{ lType.name }}</li>
|
<li :class="[lTypeId === lType.id && 'active']" v-for="lType in listTypes" :key="lType.id" @click="getPayRecords(lType.id, 1)">{{ lType.name }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="paied_list">
|
||||||
<user-merit v-for="pay in payList" :key="pay.id" :data="pay"></user-merit>
|
<user-merit v-for="pay in payList" :key="pay.id" :data="pay"></user-merit>
|
||||||
|
<div ref="target" class="observer-target">
|
||||||
<div class="read-more" v-if="noMore && page > 1">没有更多了</div>
|
<div class="read-more" v-if="noMore && page > 1">没有更多了</div>
|
||||||
<div class="read-more" v-if="noMore && page === 1">暂无数据</div>
|
<div class="read-more" v-if="noMore && page === 1">暂无数据</div>
|
||||||
<div class="read-more" v-else @click="loadMoreFn">查看更多</div>
|
<div class="read-more" v-if="!noMore" @click="loadMoreFn">查看更多</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fixed-bottom ref="fixedBottom">
|
<fixed-bottom ref="fixedBottom">
|
||||||
|
<div class="customer-absolute">
|
||||||
|
<customer-service></customer-service>
|
||||||
|
</div>
|
||||||
<button class="iconfont icon-home" v-if="query.no_login === '1'" @click="backHome"></button>
|
<button class="iconfont icon-home" v-if="query.no_login === '1'" @click="backHome"></button>
|
||||||
<button class="merit-button" @click="onHasLoginToNext">{{ data.pay_name }}</button>
|
<button class="merit-button" @click="onHasLoginToNext">{{ data.pay_name }}</button>
|
||||||
</fixed-bottom>
|
</fixed-bottom>
|
||||||
@@ -81,16 +86,20 @@ import { swiper, swiperSlide } from "vue-awesome-swiper";
|
|||||||
import { getGoodsDetail, getOrderCompare, hasLogin } from "@/api";
|
import { getGoodsDetail, getOrderCompare, hasLogin } from "@/api";
|
||||||
import SelectSpec from "./components/select-spec.vue";
|
import SelectSpec from "./components/select-spec.vue";
|
||||||
import FillInformation from "./components/fill-information.vue";
|
import FillInformation from "./components/fill-information.vue";
|
||||||
|
import ObserverInteraction from "@/util/ObserverInteraction";
|
||||||
|
import CustomerService from "@/components/customer-service/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
swiper,
|
swiper,
|
||||||
swiperSlide,
|
swiperSlide,
|
||||||
SelectSpec,
|
SelectSpec,
|
||||||
|
CustomerService,
|
||||||
FillInformation,
|
FillInformation,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
observer: null,
|
||||||
result: "a",
|
result: "a",
|
||||||
showAnyAmount: false,
|
showAnyAmount: false,
|
||||||
paddingBottom: 0,
|
paddingBottom: 0,
|
||||||
@@ -146,7 +155,22 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getGoodsDetail("common");
|
this.getGoodsDetail("common");
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.observer.disconnect();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initObserver() {
|
||||||
|
this.observer = new ObserverInteraction();
|
||||||
|
|
||||||
|
// 3. 监听元素可见性
|
||||||
|
this.observer.observeVisibility(
|
||||||
|
this.$refs.target,
|
||||||
|
() => {
|
||||||
|
this.loadMoreFn();
|
||||||
|
},
|
||||||
|
{ threshold: 0.5 }
|
||||||
|
);
|
||||||
|
},
|
||||||
backHome() {
|
backHome() {
|
||||||
const { query } = this.$router.currentRoute;
|
const { query } = this.$router.currentRoute;
|
||||||
const name = query.temple_id === "1" ? "home" : "temple-home";
|
const name = query.temple_id === "1" ? "home" : "temple-home";
|
||||||
@@ -217,6 +241,7 @@ export default {
|
|||||||
await this.getPayRecords(this.lTypeId, 1);
|
await this.getPayRecords(this.lTypeId, 1);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.paddingBottom = this.$refs.fixedBottom.getOffsetHeight() - 50;
|
this.paddingBottom = this.$refs.fixedBottom.getOffsetHeight() - 50;
|
||||||
|
this.initObserver();
|
||||||
});
|
});
|
||||||
this.wechatReady({
|
this.wechatReady({
|
||||||
...this.data.shareConfig,
|
...this.data.shareConfig,
|
||||||
@@ -226,6 +251,7 @@ export default {
|
|||||||
// 获取更多感恩功德1
|
// 获取更多感恩功德1
|
||||||
loadMoreFn() {
|
loadMoreFn() {
|
||||||
this.page += 1;
|
this.page += 1;
|
||||||
|
if (this.noMore) return;
|
||||||
this.getPayRecords(this.lTypeId, this.page);
|
this.getPayRecords(this.lTypeId, this.page);
|
||||||
},
|
},
|
||||||
// 获取感恩功德
|
// 获取感恩功德
|
||||||
@@ -347,6 +373,9 @@ $lightWidth: 1.3rem;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.paied_list {
|
||||||
|
flex: 1 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.swiper-container {
|
.swiper-container {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
@@ -515,5 +544,11 @@ $lightWidth: 1.3rem;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.customer-absolute {
|
||||||
|
position: absolute;
|
||||||
|
right: 0.3rem;
|
||||||
|
top: 0.28rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user