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