1
This commit is contained in:
parent
5a0819ff9a
commit
ef1251c790
@ -24,11 +24,24 @@
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
|
||||
<a href="http://twitter.com/share?text=测试分享&url=https://www.baidu.com/" title="twitter" target="_blank">twitter</a><br>
|
||||
|
||||
<a href="https://www.facebook.com/sharer.php?u=https://www.baidu.com/" title="facebook" target="_blank">facebook</a>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="shareToTwitter"
|
||||
>Twitter</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="shareToFacebook"
|
||||
>Facebook</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
@ -133,6 +146,23 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
shareToTwitter(){
|
||||
const text = encodeURIComponent("SINOTRUK HOWO Dump Truck Manufacturers and Factory - Price - SINOTRUCK ");
|
||||
const url = encodeURIComponent("https://www.cdtruck.com/truck/dump-truck/china-sinotruk-howo-19m3-6x4-cheap-336hp-10.html");
|
||||
const hashtags = "example,sharing";
|
||||
const twitterUrl = `https://twitter.com/intent/tweet?text=${text}&url=${url}&hashtags=${hashtags}`;
|
||||
window.open(twitterUrl, "_blank");
|
||||
},
|
||||
|
||||
shareToFacebook(){
|
||||
const text = encodeURIComponent("SINOTRUK HOWO Dump Truck Manufacturers and Factory - Price - SINOTRUCK ");
|
||||
const url = encodeURIComponent("https://www.cdtruck.com/truck/dump-truck/china-sinotruk-howo-19m3-6x4-cheap-336hp-10.html");
|
||||
const hashtags = "example,sharing";
|
||||
const facebookUrl = `https://www.facebook.com/sharer.php?u=${url}`;
|
||||
window.open(facebookUrl, "_blank");
|
||||
},
|
||||
|
||||
/** 查询网站栏目列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
Loading…
Reference in New Issue
Block a user