|
|
@@ -6,43 +6,47 @@
|
|
|
<div class="mobile-modal-content" v-if="showDefaultAddr">
|
|
|
<div>商家地址:深圳市南山区英唐大厦6楼</div>
|
|
|
<div class="content-line link-url">在线咨询</div>
|
|
|
- <div>致电:<span class="content-line link-url">0755-96586323</span></div>
|
|
|
+ <div>致电:<a href="tel:0755-96586323" class="content-line link-url">0755-96586323</a></div>
|
|
|
+ <div>邮件:<a href="mailto:yrsc@usoftchina.com" class="content-line link-url">yrsc@usoftchina.com</a></div>
|
|
|
</div>
|
|
|
<div class="mobile-modal-content" v-if="!showDefaultAddr">
|
|
|
<div>商家地址:{{store.enterprise.enAddress || store.enterprise.address}}</div>
|
|
|
<div class="content-line link-url">在线咨询</div>
|
|
|
- <div>致电:<span class="content-line link-url">{{store.enterprise.enTel}}</span></div>
|
|
|
+ <div>致电:<a :href="'tel:'+store.enterprise.enTel" class="content-line link-url">{{store.enterprise.enTel}}</a></div>
|
|
|
+ <div>邮件:<a :href="'mailto:'+store.enterprise.enEmail" class="content-line link-url">{{store.enterprise.enEmail}}</a></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="mobile-share-box" v-if="showShare">
|
|
|
<div class="share-area">
|
|
|
<ul>
|
|
|
<li class="share-item" @click="shareWeChat">
|
|
|
- <img src="/images/mobile/@2x/share/weChat@2x.png" alt="">
|
|
|
+ <i class="icon-weixin iconfont" style="color: #07af12;"></i>
|
|
|
<span>微信</span>
|
|
|
</li>
|
|
|
- <li class="share-item">
|
|
|
- <img src="/images/mobile/@2x/share/QQ@2x.png" alt="">
|
|
|
+ <li class="share-item" @click="shareQQ">
|
|
|
+ <i class="icon-qq1 iconfont" style="color: #5872f4;"></i>
|
|
|
<span>QQ</span>
|
|
|
</li>
|
|
|
<li class="share-item" @click="shareWeibo">
|
|
|
- <img src="/images/mobile/@2x/share/sina@2x.png" alt="">
|
|
|
+ <i class="icon-ff0000 iconfont" style="color: #ff0000;"></i>
|
|
|
<span>微博</span>
|
|
|
</li>
|
|
|
- <li class="share-item">
|
|
|
- <img src="/images/mobile/@2x/share/message@2x.png" alt="">
|
|
|
+ <li class="share-item" @click="shareMessage">
|
|
|
+ <i class="icon-msnui-msg-invert iconfont" style="color: #25cdb7"></i>
|
|
|
<span>短信</span>
|
|
|
+ <a href="sms:" class="hide" id="share-sms"></a>
|
|
|
</li>
|
|
|
- <li class="share-item">
|
|
|
- <img src="/images/mobile/@2x/share/email@2x.png" alt="">
|
|
|
+ <li class="share-item" @click="shareEmail">
|
|
|
+ <i class="icon-youjian iconfont" style="height: .57rem;font-size: .41rem;color:#f18215;"></i>
|
|
|
<span>邮件</span>
|
|
|
+ <a href="mailto:" class="hide" id="share-mail"></a>
|
|
|
</li>
|
|
|
- <li class="share-item">
|
|
|
- <img src="/images/mobile/@2x/share/flash@2x.png" alt="">
|
|
|
+ <li class="share-item" @click="flash">
|
|
|
+ <i class="icon-shuaxin iconfont" style="color: #2584cd;"></i>
|
|
|
<span>刷新</span>
|
|
|
</li>
|
|
|
- <li class="share-item">
|
|
|
- <img src="/images/mobile/@2x/share/copylink@2x.png" alt="">
|
|
|
+ <li class="share-item" @click="copyLink" id="copyLink" :data-clipboard-text="url">
|
|
|
+ <i class="icon-lianjie iconfont" style="color: #73b0df;"></i>
|
|
|
<span>复制链接</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
@@ -59,13 +63,16 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+ import Clipboard from 'clipboard'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
showStoreInfo: false,
|
|
|
showShare: false,
|
|
|
rightIcon: 'share',
|
|
|
- showDefaultAddr: true
|
|
|
+ showDefaultAddr: true,
|
|
|
+ url: '',
|
|
|
+ clipboard: {}
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -82,6 +89,19 @@
|
|
|
return this.$store.state.componentDetail.detail.data
|
|
|
}
|
|
|
},
|
|
|
+ mounted () {
|
|
|
+ let _this = this
|
|
|
+ _this.url = window.location.href
|
|
|
+ _this.clipboard = new Clipboard('#copyLink')
|
|
|
+ _this.clipboard.on('success', e => {
|
|
|
+ _this.clipboard.destroy()
|
|
|
+ _this.showShare = false
|
|
|
+ })
|
|
|
+ _this.clipboard.on('error', e => {
|
|
|
+ alert('浏览器不支持自动复制,请手动复制')
|
|
|
+ _this.clipboard.destroy()
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
goLastPage: function () {
|
|
|
window.history.back(-1)
|
|
|
@@ -137,7 +157,34 @@
|
|
|
_shareUrl += '&sourceUrl=' + encodeURIComponent('')
|
|
|
_shareUrl += '&content=' + 'utf-8' // 参数content设置页面编码gb2312|utf-8,可选参数
|
|
|
_shareUrl += '&pic=' + encodeURIComponent('') // 参数pic设置图片链接|默认为空,可选参数
|
|
|
- window.open(_shareUrl, '_blank', 'width=' + 300 + ',height=' + 300 + ',top=' + 300 + ',left=' + 300 + ',toolbar=no,menubar=no,scrollbars=no, resizable=1,location=no,status=0')
|
|
|
+ window.open(_shareUrl)
|
|
|
+ this.showShare = false
|
|
|
+ },
|
|
|
+ shareWeChat: function () {
|
|
|
+ },
|
|
|
+ shareQQ: function () {
|
|
|
+ let url = encodeURIComponent(document.location)
|
|
|
+ let title = encodeURIComponent(document.title)
|
|
|
+ let source = encodeURIComponent('')
|
|
|
+ let desc = '优软商城'
|
|
|
+ let pics = 'http://dfs.ubtob.com/group1/M00/4F/C3/CgpkyFnxWjOAMy5DAAlh1PrLlc8684.png'
|
|
|
+ window.open('http://connect.qq.com/widget/shareqq/index.html?url=' +
|
|
|
+ url + '&title=' + title + '&source=' + source + '&desc=' + desc + '&pics=' + pics)
|
|
|
+ this.showShare = false
|
|
|
+ },
|
|
|
+ shareMessage: function () {
|
|
|
+ document.getElementById('share-sms').click()
|
|
|
+ },
|
|
|
+ shareEmail: function () {
|
|
|
+ document.getElementById('share-mail').click()
|
|
|
+ },
|
|
|
+ flash: function () {
|
|
|
+ window.location.reload()
|
|
|
+ },
|
|
|
+ copyLink: function () {
|
|
|
+ let _this = this
|
|
|
+ _this.url = window.location.href
|
|
|
+ _this.clipboard = new Clipboard('#copyLink')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -171,4 +218,7 @@
|
|
|
.mobile-header i{
|
|
|
font-size:.4rem;
|
|
|
}
|
|
|
+ .hide {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
</style>
|