Commit f0e7e22a authored by beisir's avatar beisir

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

parents 0f69a8cd 274a7674
module.exports = { module.exports = {
// Sentry options are required // Sentry options are required
organization: 'sentry', organization: 'sentry',
project: 'vcc-spider-center-ui', project: 'group-buy-ui',
apiKey: '0d3fa45c10f047d7bfe03eb268a93c23a878d7585dc749418f728f88d65e1477', apiKey: '0d3fa45c10f047d7bfe03eb268a93c23a878d7585dc749418f728f88d65e1477',
// Release version name/hash is required // Release version name/hash is required
release: 'vcc-spider-center-ui@1.0.1', release: 'group-buy-ui@1.0.0',
baseSentryURL: 'http://sentry.quantgroups.com/api/0', baseSentryURL: 'http://sentry.quantgroups.com/api/0',
deleteAfterCompile: true, deleteAfterCompile: true,
include: /static\/js\//, // 只上传js和map文件 include: /static\/js\//, // 只上传js和map文件
ignore: ['node_modules'], ignore: ['node_modules'],
suppressErrors: true, suppressErrors: true,
filenameTransform: function (filename) { filenameTransform: function (filename) {
return '~/vcc-spider-center-ui/public/' + filename return '~/group-buy-ui/public/' + filename
}, },
} }
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
邀请好友 邀请好友
</cr-button> </cr-button>
<cr-button <cr-button
v-else v-if="info.groupBuyStatus != 1 && !timeIsOver"
shape="circle" shape="circle"
plain plain
:disabled="disabled" :disabled="disabled"
...@@ -98,13 +98,30 @@ export default { ...@@ -98,13 +98,30 @@ export default {
status: { status: {
type: Number, type: Number,
default: 1 // 1是大图详情页, 2是小图详情页 default: 1 // 1是大图详情页, 2是小图详情页
},
endTime: {
type: String,
default: ''
},
currentTime: {
type: String,
default: ''
} }
}, },
data() { data() {
return { return {
nativeBridge: null nativeBridge: null,
timeIsOver: false
}; };
}, },
created() {
if (this.status == 2) {
// 订单详情页
const currentTime = new Date(this.currentTime.replace(/\-/g, '/')).getTime();
const endTime = new Date(this.endTime.replace(/\-/g, '/')).getTime();
this.timeIsOver = currentTime >= endTime ? true : false;
}
},
methods: { methods: {
toList() { toList() {
const { activityId } = this.$route.query || ''; const { activityId } = this.$route.query || '';
......
...@@ -42,7 +42,13 @@ ...@@ -42,7 +42,13 @@
@click="share" @click="share"
>邀请好友</cr-button >邀请好友</cr-button
> >
<cr-button v-else plain block shape="circle" type="primary" @click="toList" <cr-button
v-if="groupInfo.groupBuyStatus != 1 && !timeIsOver"
plain
block
shape="circle"
type="primary"
@click="toList"
>查看其他商品</cr-button >查看其他商品</cr-button
> >
</div> </div>
...@@ -68,6 +74,14 @@ export default { ...@@ -68,6 +74,14 @@ export default {
default: () => { default: () => {
return {}; return {};
} }
},
endTime: {
type: String,
default: ''
},
currentTime: {
type: String,
default: ''
} }
}, },
data() { data() {
...@@ -78,9 +92,15 @@ export default { ...@@ -78,9 +92,15 @@ export default {
2: '恭喜成团!', 2: '恭喜成团!',
3: '哎呀,拼团时间已过,尚未成团!', 3: '哎呀,拼团时间已过,尚未成团!',
4: '已发货' 4: '已发货'
} },
timeIsOver: false
}; };
}, },
created() {
const currentTime = new Date(this.currentTime.replace(/\-/g, '/')).getTime();
const endTime = new Date(this.endTime.replace(/\-/g, '/')).getTime();
this.timeIsOver = currentTime >= endTime ? true : false;
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.buttonArea) { if (this.$refs.buttonArea) {
......
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
<group-desc-info <group-desc-info
:group-info="detailInfo.groupBuyInfo || {}" :group-info="detailInfo.groupBuyInfo || {}"
:timestemp="groupTimestemp" :timestemp="groupTimestemp"
:current-time="detailInfo.currentTime"
:end-time="detailInfo.endTime"
:show-button-group="true" :show-button-group="true"
@changeButtonVisible="changeButtonVisible" @changeButtonVisible="changeButtonVisible"
@share="setShareData" @share="setShareData"
...@@ -102,6 +104,8 @@ ...@@ -102,6 +104,8 @@
</div> </div>
<bottom-nav <bottom-nav
v-if="showButtonNav" v-if="showButtonNav"
:current-time="detailInfo.currentTime"
:end-time="detailInfo.endTime"
:info="detailInfo.groupBuyInfo || {}" :info="detailInfo.groupBuyInfo || {}"
:status="2" :status="2"
:disabled="false" :disabled="false"
......
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