调整排行榜,增加banner图链接,增加公告信息分享功能

This commit is contained in:
唐明明
2022-08-05 14:41:35 +08:00
parent afa7361e2c
commit 2d93d2c1e2
11 changed files with 3586 additions and 4828 deletions

View File

@@ -2,7 +2,7 @@
"name" : "共力生态",
"appid" : "__UNI__DE7B0E6",
"description" : "共力生态",
"versionName" : "1.0.40",
"versionName" : "1.0.41",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */

View File

@@ -520,7 +520,17 @@
"style": {
"navigationBarTitleText": "公告详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#FFFFFF"
"navigationBarBackgroundColor": "#FFFFFF",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "分享",
"fontSize": "14",
"width": "60px",
"color": "#333"
}]
}
}
}
}, {
"path": "pages/group-book/index",

View File

@@ -19,7 +19,7 @@
</view>
<!-- 分享 -->
<uni-popup ref="popupShare" type="share" background-color="#fff">
<uni-popup-share title="分享到" @select="select"></uni-popup-share>
<uni-popup-share title="分享到" @select="select" :isDowImg="true"></uni-popup-share>
</uni-popup>
</view>
</template>

View File

@@ -5,6 +5,10 @@
<view class="text">
<rich-text :nodes="content"></rich-text>
</view>
<!-- 分享 -->
<uni-popup ref="popupShare" type="share" background-color="#fff">
<uni-popup-share title="分享到" @select="select"></uni-popup-share>
</uni-popup>
</view>
</template>
@@ -16,12 +20,16 @@
title : '',
content : '',
time : '',
categorie : ''
categorie : '',
id : '',
description : ''
};
},
onLoad(e){
info(e.id).then(res => {
this.id = e.id
this.title = res.title
this.description= res.description
this.time = res.created_at
this.content = res.content.replace(/\<img/gi, '<img style="max-width:100%; height:auto; display:block;"');
this.categorie = res.categories[0].title
@@ -31,6 +39,48 @@
icon : 'none'
})
})
},
methods: {
select(e){
switch (e.item.name) {
case 'wxchum':
uni.share({
provider: 'weixin',
scene: 'WXSceneSession',
type: 0,
href: 'https://invite.gongli.vip/articles/' + this.id,
title: '共力生态-' + this.title,
summary: this.description,
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
fail(err) {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
})
break;
case 'wxcircle':
uni.share({
provider: 'weixin',
scene: 'WXSceneTimeline',
type: 0,
href: 'https://invite.gongli.vip/articles/' + this.id,
summary: '共力生态-' + this.title,
imageUrl: 'https://gl-ecological.oss-cn-zhangjiakou.aliyuncs.com/images/2022/06/11/3b7e6e330f465ecbf136d15def1039fd.jpg',
fail(err) {
uni.showToast({
title: err.errMsg,
icon: 'none'
})
}
})
break;
}
}
},
onNavigationBarButtonTap() {
this.$refs.popupShare.open();
}
}
</script>

View File

@@ -11,7 +11,6 @@
<u-sticky bgColor="#34CE98">
<u-tabs
:list="tabs"
:scrollable="false"
lineColor="white"
:activeStyle="{color: 'white', fontWeight: 'bold', fontSize: '14px'}"
:inactiveStyle="{color: 'rgba(255,255,255,.6)', fontSize: '14px'}"
@@ -112,7 +111,6 @@
},
methods: {
onTabs(e){
console.log(e)
if(this.type == e.type){
return
}

View File

@@ -111,8 +111,12 @@
goBook(item){
if(item.url){
if(item.url.openType === 'navigateTo'){
let url = item.url.path
if(item.url.params != ''){
url = url + '?' + item.url.params
}
uni.navigateTo({
url:item.url.path
url
})
}
}

View File

@@ -7,7 +7,6 @@
<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
<text class="uni-share-text">{{item.text}}</text>
</view>
</view>
</view>
<view class="uni-share-button-box">
@@ -36,6 +35,10 @@
beforeClose: {
type: Boolean,
default: false
},
isDowImg : {
type : Boolean,
undefined: true
}
},
data() {
@@ -44,36 +47,22 @@
text: '微信好友',
icon: require('@/static/icon/share_icon_01.png'),
name: 'wxchum'
},
{
},{
text: '朋友圈',
icon: require('@/static/icon/share_icon_00.png'),
name: 'wxcircle'
}]
}
},
{
created() {
if(this.isDowImg){
this.bottomData.push({
text: '下载图片',
icon: require('@/static/icon/share_icon_02.png'),
name: 'download'
},
// {
// text: '新浪',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
// name: 'sina'
// },
// {
// text: '百度',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
// name: 'copy'
// },
// {
// text: '其他',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
// name: 'more'
// }
]
})
}
},
created() {},
computed: {
cancelText() {
return t("uni-popup.cancel")
@@ -142,7 +131,8 @@
}
.uni-share-content-item {
width: 33.33%;
// width: ;
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long