Commit eabe050f authored by Xuguangxing's avatar Xuguangxing

Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy

parents 1aa3f3e1 c4acff51
...@@ -76,8 +76,6 @@ import localStorage from '@/service/localStorage.service'; ...@@ -76,8 +76,6 @@ import localStorage from '@/service/localStorage.service';
import goodsCheckMixin from '@/mixins/goodsCheck.mixin'; import goodsCheckMixin from '@/mixins/goodsCheck.mixin';
import { setAppTitleColor, EventBus, firstGroupShare } from '@/service/utils.service'; import { setAppTitleColor, EventBus, firstGroupShare } from '@/service/utils.service';
import { saTrackEvent } from '@/service/sa.service'; import { saTrackEvent } from '@/service/sa.service';
// import { isNull } from '@/service/validation.service';
// let topicIndex;
export default { export default {
// eslint-disable-next-line vue/name-property-casing // eslint-disable-next-line vue/name-property-casing
name: 'groupBuyList', name: 'groupBuyList',
...@@ -121,15 +119,6 @@ export default { ...@@ -121,15 +119,6 @@ export default {
return +new Date(endTime || 0); return +new Date(endTime || 0);
} }
}, },
watch: {
// $route(to) {
// if (to.name !== 'groupBuyList') {
// this.setTitleColor();
// return;
// }
// this.setTitleColor(this.goodsTemp.bgcolor);
// }
},
created() { created() {
this.showLoops = true; this.showLoops = true;
this.reload = true; this.reload = true;
...@@ -137,12 +126,6 @@ export default { ...@@ -137,12 +126,6 @@ export default {
beforeDestroy() { beforeDestroy() {
this.setTitleColor(); this.setTitleColor();
}, },
// deactivated() {
// this.showLoops = false;
// },
// activated() {
// this.showLoops = true;
// },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
const { activityId } = to.query; const { activityId } = to.query;
if (!activityId || isNaN(activityId)) { if (!activityId || isNaN(activityId)) {
...@@ -153,17 +136,6 @@ export default { ...@@ -153,17 +136,6 @@ export default {
return; return;
} else { } else {
getActivityList(to.query, next); getActivityList(to.query, next);
// if (isNull(topicIndex)) {
// getActivityList(to.query, next);
// } else {
// if (localStorage.get('activityId') !== +activityId) {
// getActivityList(to.query, next);
// return;
// }
// next(vm => {
// store.commit('CHANGE_TITLE', vm.goodsTemp.title || '活动页');
// });
// }
} }
}, },
methods: { methods: {
...@@ -319,33 +291,6 @@ async function getActivityList(urlQuery, next) { ...@@ -319,33 +291,6 @@ async function getActivityList(urlQuery, next) {
// t.endTime = '2021-09-23 19:17:20'; // t.endTime = '2021-09-23 19:17:20';
t = await computedTemplate(t); t = await computedTemplate(t);
t.groupBuyUserInfoList = (t.groupBuyUserInfoList || []).reverse(); t.groupBuyUserInfoList = (t.groupBuyUserInfoList || []).reverse();
// t.groupBuyUserInfoList = [
// {
// name: '皱眉',
// avatar:
// 'https://img.lkbang.net/avator/0c8c1cfeb1cfdfffd77ac74af83377a17812a3585027-OKt5j9_fw658.jpeg'
// },
// {
// name: '空白人生',
// avatar:
// 'https://img.lkbang.net/avator/e684de0d4db0fcd3a04945ff7ed394abb678ce577dba5-VJbncW_fw658.jpeg'
// },
// {
// name: '逅黄昏',
// avatar:
// 'https://img.lkbang.net/avator/900b3be08740dbe4e38f7c3b7a73b613538a2f2edac3-yXzWfB_fw658.jpeg'
// },
// {
// name: '桑过后正年轻',
// avatar:
// 'https://img.lkbang.net/avator/7ca48321827385f386d0317a40d3f6201f442fddf99a-xXvv37_fw658.jpeg'
// },
// {
// name: '年少就是不服输',
// avatar:
// 'https://img.lkbang.net/avator/e33db7b617e42367d888e3821e1acd89b4b20319cb42-esiOS3_fw658.jpeg'
// }
// ];
store.commit('CHANGE_TITLE', t.title || '活动页'); store.commit('CHANGE_TITLE', t.title || '活动页');
nextFns(vm => { nextFns(vm => {
// topicIndex = 0; // topicIndex = 0;
......
<template> <template>
<div> <div class="pay-result">
<div v-if="isSuccess" class="card"> <div v-if="isSuccess" class="card">
<div class="info"> <div class="info">
<cr-image <cr-image
...@@ -18,11 +18,21 @@ ...@@ -18,11 +18,21 @@
拼团成功即可退款0元拿,拼团失败立即退款 拼团成功即可退款0元拿,拼团失败立即退款
</p> </p>
<div class="actions"> <div class="actions">
<cr-button shape="circle" type="default" @click="goPage(1)">我的拼团</cr-button> <cr-button shape="circle" class="actions__share" type="primary" @click="share"
<cr-button shape="circle" class="actions__back" :plain="true" type="primary" @click="share"
>邀请好友</cr-button >邀请好友</cr-button
> >
</div> </div>
<div class="actions">
<cr-button shape="circle" type="default" @click="goGroupList">返回活动列表</cr-button>
<cr-button
shape="circle"
class="actions__back"
:plain="true"
type="primary"
@click="goPage(1)"
>查看我的拼团</cr-button
>
</div>
</div> </div>
<div v-else class="card"> <div v-else class="card">
<div class="info"> <div class="info">
...@@ -135,6 +145,10 @@ export default { ...@@ -135,6 +145,10 @@ export default {
this.shareInfo = res; this.shareInfo = res;
firstGroupShare(res, 3); firstGroupShare(res, 3);
}, },
goGroupList() {
const { activityId } = this.shareInfo;
this.$router.push(`/groupBuy/list?activityId=${activityId}`);
},
goPage(type) { goPage(type) {
if (type == 1) { if (type == 1) {
this.$router.replace({ path: '/orderList/0' }); this.$router.replace({ path: '/orderList/0' });
...@@ -170,25 +184,31 @@ export default { ...@@ -170,25 +184,31 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pay-result {
height: 100%;
}
.card { .card {
margin: @padding-sm; // margin: @padding-sm;
height: 100%;
background-color: @white; background-color: @white;
border-radius: @border-radius-sm; // border-radius: @border-radius-sm;
padding: 28px @padding-sm @padding-sm @padding-sm; padding: 28px @padding-sm @padding-sm @padding-sm;
box-sizing: border-box;
.info { .info {
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
&__image { &__image {
width: 100px; width: 100px;
height: 100px; height: 100px;
margin: @padding-xl 0;
} }
&__text { &__text {
.text-16; .text-16;
margin-left: @padding-md; // margin-left: @padding-md;
} }
&__desc { &__desc {
...@@ -200,6 +220,7 @@ export default { ...@@ -200,6 +220,7 @@ export default {
margin-top: @padding-xs; margin-top: @padding-xs;
} }
&__free { &__free {
text-align: center;
.text-13; .text-13;
margin-top: @padding-xs; margin-top: @padding-xs;
color: @font-color-light; color: @font-color-light;
...@@ -209,7 +230,7 @@ export default { ...@@ -209,7 +230,7 @@ export default {
.tips { .tips {
.text-12; .text-12;
text-align: center; text-align: center;
margin-top: @padding-lg; margin-top: @padding-xs;
color: @font-color-light; color: @font-color-light;
} }
...@@ -231,7 +252,11 @@ export default { ...@@ -231,7 +252,11 @@ export default {
button { button {
// flex: 1; // flex: 1;
.text-16; .text-16;
width: 161px; width: 170px;
line-height: normal;
}
&__share {
width: 100% !important;
} }
} }
.info_button { .info_button {
......
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