Commit c7cb6239 authored by beisir's avatar beisir

feat:我的订单到详情页

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