Commit 565345b1 by wuwx

'众筹活动页,分享众筹活动页面搭建'

1 parent 4bc6d765
......@@ -304,6 +304,7 @@
:isDisabled="item.isDisabled"
@selectProvince="e => handleSelectProvince(e, item)"
@selectCity="e => handleSelectCity(e, item)"
:provinceView="item.provinceView"
></Province>
<el-input
style="flex: 1;"
......
......@@ -19,7 +19,7 @@ export const fetchConfig = function(isEnv = true) {
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
}
......
<!-- 众筹分享弹窗 -->
<template>
<GLDialog title="分享" mode="mid" okText="关闭" :visible.sync="isShareVisible" :before-close="handleShareClose" :hasFooter="false">
<div class="share-dialog">
<div>
<img style="width: 220px; height: 310px;" :src="shareForm.posterUrl" />
<el-button style="display: block;margin-top: 12px;margin-left: 65px;" :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">下载海报</el-button>
</div>
<div>
<div class="code">
<div class="activity-code">
<div class="code-img">
<img style="width: 146px; height: 146px;" :src="shareForm.qrCodeUrl" />
</div>
<div>
<p class="code-text">活动二维码</p>
<el-button style="margin-top: 17px;" :size="size" type="primary" @click="handleSaveImg(shareForm.qrCodeUrl, '活动二维码')">下载二维码</el-button>
</div>
</div>
<div class="activity-code" style="margin-top: 14px;">
<div class="code-img">
<img style="width: 146px; height: 146px;" :src="shareForm.staffLoginQrCodeUrl" />
</div>
<div>
<p class="code-text">员工注册码</p>
<el-button style="margin-top: 17px;" :size="size" type="primary" @click="handleSaveImg(shareForm.staffLoginQrCodeUrl, '员工注册码')">下载注册码</el-button>
</div>
</div>
</div>
</div>
</div>
<div class="page-route">
<div>
<span class="share-txt">H5短链接:</span>
<span class="copy" @click="handleSaveTxt(shareForm.linkUrl)">复制</span>
</div>
<p class="link" style="margin-bottom: 16px;">{{ shareForm.linkUrl }}</p>
<div>
<span class="share-txt">员工注册码链接:</span>
<span class="copy" @click="handleSaveTxt(shareForm.staffLoginLinkUrl)">复制</span>
</div>
<p class="link" style="margin-bottom: 16px;">{{ shareForm.staffLoginLinkUrl }}</p>
<div>
<span class="share-txt">活动ID:</span>
<span class="copy" @click="handleSaveTxt(shareForm.id)">复制</span>
</div>
<p class="link">{{ shareForm.id }}</p>
</div>
</GLDialog>
</template>
<script>
export default {
name: 'crowdFundingShare',
data() {
return {}
},
props: {
isShareVisible: {
type: Boolean,
default: false
},
shareForm: {
type: Object,
default: () => { }
}
},
mounted() { },
methods: {
handleSaveImg(url, downloadTxt = '海报') {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
alink.download = downloadTxt
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', txt)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
handleShareClose() {
this.$emit('handleShareClose')
}
}
}
</script>
<style scoped>
.share-dialog {
display: flex;
}
.share-dialog .code {
height: 310px;
border-left: 1px dashed #DCDFE6;
margin-left: 20px;
}
.share-dialog .code .code-img {
width: 146px;
height: 146px;
border: 1px solid #E8E8EA;
margin-left: 20px;
margin-right: 36px;
}
.share-dialog .code .activity-code {
display: flex;
align-items: center;
}
.share-dialog .code .code-text {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
}
.page-route {
margin-top: 20px;
background: #F4F6FC;
padding: 20px;
}
.page-route .link {
width: 492px;
font-family: PingFangSC-Medium;
font-size: 14px;
color: #5850FF;
line-height: 20px;
}
.page-route .share-txt {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
}
.page-route .copy {
width: 40px;
height: 20px;
background: #5850FF;
border-radius: 2px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #FFFFFF;
display: inline-block;
line-height: 20px;
text-align: center;
cursor: pointer;
}
</style>
......@@ -93,17 +93,13 @@
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 分享 -->
<share-dialog
:isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"
></share-dialog>
<!-- 众筹分享 -->
<crowdFundingShare :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"></crowdFundingShare>
</div>
</template>
<script>
import shareDialog from '../productGroup/components/shareDialog'
import crowdFundingShare from '../productGroup/components/crowdFundingShareDialog.vue'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant'
......@@ -370,7 +366,7 @@ export default {
},
components: {
shareDialog
crowdFundingShare
},
mounted () {
......
File mode changed
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!