Commit 318047f8 authored by Xuguangxing's avatar Xuguangxing

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

parents dc644d71 e4d6b301
......@@ -11,6 +11,7 @@
<script>
import MpBridge from '@/service/mp';
import { mapState } from 'vuex';
import { registeredEvents } from '@/service/sa.service';
export default {
name: 'GroupShare',
components: {},
......@@ -32,6 +33,7 @@ export default {
}),
showShare: {
get() {
console.log(this.$store.state.pay);
return this.$store.state.pay.showShare;
},
set() {
......@@ -61,6 +63,13 @@ export default {
});
this.shareDialogConfirm();
}
registeredEvents('H5_GroupZeroYuanPurchaseActivityPageSharePopupWindowBtnClick', {
sku_no: '',
buttons_name: '', // 按钮名称
activity_id: '',
page_title: '',
leader_user_id: '' //团长user_id
});
},
shareDialogConfirm() {
this.$dialog({
......
<template>
<dl class="group-item" :class="{ disabled: groupStop }" @click.stop="onButtonClick">
<dl class="group-item" :class="{ disabled: groupStop }" @click="onButtonClick">
<dt class="group-item-thumb">
<cr-image :src="goodsItem.thumbImageUrl" />
<span class="group-item-tag">{{ goodsItem.groupBuyLimitUserCount }}人团</span>
......@@ -24,13 +24,19 @@
<!-- 已抢光 -->
<!-- 未开始 -->
<!-- 已结束 -->
<cr-button size="small" shape="circle" type="danger" :disabled="btnByStatus.d">{{
btnByStatus.t
}}</cr-button>
<cr-button
size="small"
shape="circle"
type="danger"
:disabled="btnByStatus.d"
@click.stop="onButtonClick"
>{{ btnByStatus.t }}</cr-button
>
</dd>
</dl>
</template>
<script>
import { registeredEvents } from '@/service/sa.service';
export default {
name: 'GoodsCard',
props: {
......@@ -106,7 +112,9 @@ export default {
// activityId=47
// templateId=58
// templateDetailId=83
registeredEvents('H5_GroupZeroYuanPurchaseActivityPageOpenGroupImmediatelyBtnClick', {
skuNo
});
this.$router.push({
path: '/groupBuy/skuInfo',
query: {
......
......@@ -84,6 +84,7 @@ import { handleRemainTime, handleDateFormat } from './components/utils';
import localStorage from '@/service/localStorage.service';
import goodsCheckMixin from '@/mixins/goodsCheck.mixin';
import { setAppTitleColor } from '@/service/utils.service';
import { registeredEvents } from '@/service/sa.service';
let topicIndex;
export default {
// eslint-disable-next-line vue/name-property-casing
......@@ -193,23 +194,31 @@ export default {
},
async goToMyorder() {
console.log(this.$track);
const isLogin = this.checkLogin();
if (!isLogin) {
this.$router.push('/orderList/0');
}
},
async openShareEvent() {
const activity_id = this.activityId;
let options = await this.getShareData();
this.$store.dispatch('goods_share_open', options);
registeredEvents('H5_GroupZeroYuanPurchaseActivityPageSharePopupBtnClick', {
activity_id
});
},
async getShareData() {
// const link = `${window.location.origin}/groupBuy/list`;
const { title, sharePosterTemplateUrl, img } = this.topicCfg;
const link = window.location.href;
return Promise.resolve({
title: '随便砍砍就能拿,价格你来定',
title,
desc: '我正在免费拿商品,请你帮帮我',
link: `${window.location.origin}/activity/zeroBuy`, // 页面地址
imgUrl: 'https://appsync.lkbang.net/shareIcon.png' // 图片地
link: `pages/webview/webview?url=${link}/`, // 页面地址
imgUrl: img, // 图片地
posterUrl: sharePosterTemplateUrl
});
// await
},
showSwipeSync(avatorData) {
let timer = setTimeout(() => {
......@@ -285,8 +294,8 @@ async function getActivityList(urlQuery, next) {
const [result] = await groupBuyApi.getTemplateList(activityId);
if (result?.templateInfo) {
let t = result.templateInfo;
// t.startTime = '2021-09-15 00:00:00';
// t.endTime = '2021-09-22 00:00:00';
// t.startTime = '2021-09-25 00:00:00';
// t.endTime = '2021-09-15 00:00:00';
// t.startTime = '2021-09-15 00:00:00';
// t.endTime = '2021-09-18 00:00:00';
const { endTime, startTime } = t;
......
......@@ -88,6 +88,8 @@ import countDown from '@/components/countDown';
import { isWxMp, isApp } from '@/service/validation.service';
import Bridge from '@qg/js-bridge';
import MpBridge from '@/service/mp';
import { registeredEvents } from '@/service/sa.service';
export default {
name: 'OrderSkuList',
components: {
......@@ -159,6 +161,11 @@ export default {
async openShareEvent(skuInfo) {
let options = await this.getShareData(skuInfo);
this.$store.dispatch('goods_share_open', options);
registeredEvents('H5_MyPuzzlePageGroupOrderBtnClick', {
sku_no: '',
leader_user_id: ''
});
},
async getShareData(skuInfo) {
return Promise.resolve({
......
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