Commit c7cb6239 authored by beisir's avatar beisir

feat:我的订单到详情页

parent f586fa06
<template>
<div class="avator-swiper" @click="onSlidePrevChange">
<div class="avator-swiper">
<swiper ref="mySwiper" :options="swiperOptions" class="avator-swiper_container">
<swiper-slide
v-for="(item, index) in avatorData"
......@@ -79,21 +79,15 @@ export default {
return this.$refs.mySwiper.swiper;
}
},
watch: {
avatorData() {
clearInterval(this.timer);
this.onSlidePrevChange();
}
},
mounted() {
this.onSlidePrevChange();
},
beforeDestroy() {
this.swiper.destroy(true);
clearInterval(this.timer);
// this.onSlidePrevChange();
},
// beforeDestroy() {
// this.swiper.destroy(true);
// },
methods: {
onSlidePrevChange() {
this.timer && clearInterval(this.timer);
this.timer = setInterval(() => {
this.$emit('animation-event-start');
this.swiper.slidePrev();
......
......@@ -289,10 +289,10 @@ export const isWechat = ua.match(/MicroMessenger/i) == "micromessenger";
export const isWxMp = ua.match(/miniProgram/i) == 'miniprogram';
// 判断羊小咩(信用钱包)环境
export const isApp= ua.match(/xyqb/i) == "xyqb";
export const isApp = ua.match(/xyqb/i) == "xyqb";
// 判断真享生活
export const isVcc= ua.match(/VCC/i) == "vcc";
export const isVcc = ua.match(/VCC/i) == "vcc";
// 判断IOS环境
export const isIOS = /iphone|ipad|ipod/.test(ua);
......@@ -303,6 +303,9 @@ export const isAndroid = /android/.test(ua);
// 判断
export const appVersion = ua.match(/xyqb\/([\d|.]+)/);
// 判断羊小咩环境
export const isXyqb = ua.match(/xyqb/i) == "xyqb";
export const isQQ = ua.match(/QQ/i) == 'qq';
export const isWeiBo = ua.match(/Weibo/i) == 'weibo';
......
......@@ -156,7 +156,7 @@ export default {
border-radius: 6px;
overflow: hidden;
position: relative;
padding: 3px;
// padding: 3px;
margin-right: 8px;
.cr-image {
width: 100%;
......
......@@ -18,7 +18,8 @@
</div>
<div class="group-portrait-ul">
<groupSwiper
v-if="topicCfg.groupBuyUserInfoList"
v-if="showLoops"
ref="swipeRota"
:avator-data="topicCfg.groupBuyUserInfoList"
@animation-event-start="animationEventStart"
@animation-event-end="animationEventEnd"
......@@ -92,7 +93,6 @@ export default {
data() {
return {
showShare: false,
avatorData: [],
animate: {
......@@ -104,6 +104,7 @@ export default {
},
showSwipe: false,
showLoops: false,
customers: {},
// goodsSpecialId 是
......@@ -169,7 +170,15 @@ export default {
}
}
},
deactivated() {
clearTimeout(this.$refs.swipeRota.timer);
this.showLoops = false;
},
activated() {
this.showLoops = true;
this.$nextTick(() => {
this.$refs.swipeRota.onSlidePrevChange();
});
// this.topicIndex = topicIndex;
// this.setTitleColor(this.topicCfg.bgcolor);
// store.commit('changeTitle', this.topicCfg.title || '活动页');
......
......@@ -74,6 +74,9 @@ import ListItem from './ListItem.vue';
const EVENT_LOADING = 'load';
const EVENT_CLICK = 'option-click';
import countDown from '@/components/countDown';
import { isWxMp, isApp } from '@/service/validation.service';
import Bridge from '@qg/js-bridge';
import MpBridge from '@/service/mp';
export default {
name: 'OrderSkuList',
components: {
......@@ -90,6 +93,7 @@ export default {
},
data() {
return {
nativeBridge: null,
gpCountDown: new Date('2021-09-12 00:00:00').getTime(),
listLoading: false,
......@@ -123,31 +127,21 @@ export default {
this.listFinished = val;
}
},
created() {
if (isApp) this.nativeBridge = new Bridge();
else if (isWxMp) this.nativeBridge = new MpBridge();
},
methods: {
goGroupDetails(goodsItem) {
const {
skuNo,
goodsSpecialId,
activityTemplateInfoId,
activityTemplateDetailId,
activityInfoId
} = goodsItem;
this.$router.push({
paht: '/groupBuy/skuInfoSmallPic',
query: {
h: 0,
skuNo,
goodsSpecialId,
activityId: activityInfoId,
templateId: activityTemplateInfoId,
templateDetailId: activityTemplateDetailId
}
goGroupDetails(skuInfo) {
this.nativeBridge.openNewUrl({
newUrl: `/pages/order/orderDetail?orderNo=${skuInfo.orderNo}`
});
},
async openShareEvent(skuInfo) {
let options = await this.getShareData(skuInfo);
this.$store.dispatch('goods_share_open', options);
this.goGroupDetails(skuInfo);
// let options = await this.getShareData(skuInfo);
// this.$store.dispatch('goods_share_open', options);
},
async getShareData(skuInfo) {
return Promise.resolve({
......@@ -158,8 +152,20 @@ export default {
});
// await
},
toDetail(order) {
this.$router.push({ path: '/orderDetail', query: { orderNo: order.orderNo } });
toDetail(goodsItem) {
const { skuNo, skuList, activityInfoId, activityHundredGroupId } = goodsItem;
this.$router.push({
path: '/groupBuy/skuInfoSmallPic',
query: {
h: 0,
skuNo,
activityHundredGroupId,
goodsSpecialId: skuList[0].goodsSpecialId,
activityId: activityInfoId,
templateId: skuList[0].activityTemplateInfoId,
templateDetailId: skuList[0].activityTemplateDetailId
}
});
},
onLoad() {
this.$emit(EVENT_LOADING);
......
......@@ -253,7 +253,7 @@ export default {
pageSize,
status
});
console.log(res.records);
// console.log(res.records);
if (res?.records?.length) {
this.setNavListData('loading', false);
list = [...list, ...res.records];
......
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