Merge branch 'xie1023'

This commit is contained in:
@fawn-nine
2023-11-02 13:14:17 +08:00
6 changed files with 75 additions and 5 deletions

View File

@@ -66,6 +66,10 @@
mode="aspectFit"></image>
</view>
<view class="txt" v-if="taskInfo.content" v-html="taskInfo.content"></view>
<view class="share flexbox" @click="newOnShare()" v-if="isAndorid">
<text>分享</text>
<image src="/static/share.png" class="per_mes_img" style="width: 40rpx; height: 40rpx; "></image>
</view>
</view>
<view v-else>
<u-divider text="今天未发布打卡任务"></u-divider>
@@ -176,6 +180,10 @@
</view>
</view>
<!-- 分享弹窗 -->
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
<uni-popup-share @select="haveSelected"></uni-popup-share>
</uni-popup>
<!-- 回复评论弹窗 -->
<u-popup mode="bottom" :show="pinglunShow" :round="10" @close="pinglunShow=false">
<view class="tanchu">
@@ -273,6 +281,7 @@
export default {
data() {
return {
isAndorid:true,
opPinglun: {}, // 针对的评论对象
pinglunShow: false,
placeholder: '开始输入...',
@@ -343,6 +352,7 @@
onLoad(e) {
this.bookid = e.bookid
this.windowWidth = uni.getSystemInfoSync().windowWidth;
this.getOS()
},
onPullDownRefresh() {
console.log('下拉刷新了')
@@ -365,11 +375,66 @@
...mapState(['userInfo'])
},
methods: {
// 获得操作系统
getOS(){
let oprateOs = ''
oprateOs = uni.getSystemInfoSync().platform
// console.log(oprateOs)
if(oprateOs == 'android'){
this.isAndorid = true
}else{
this.isAndorid = false
}
},
haveSelected(data){
let image = ''
this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image = 'static/fengziIcon.jpg'
console.log(data,' 选择的是')
if(data.index == 0){
// 分享到好友
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: this.$apkUrl,
title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
summary: `${this.taskInfo.content}`,
imageUrl: image,
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}else if(data.index == 1){
// 分享到朋友圈
uni.share({
provider: "weixin",
scene: "WXSceneTimeline",
type: 0,
href: this.$apkUrl,
title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
summary: `${this.taskInfo.content}`,
imageUrl: image,
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}
},
// 新写分享
newOnShare(){
this.$refs.share.open()
},
showPingLun(item) {
// 回复评论
this.opPinglun = item
this.pinglunShow = true
console.log('item45456', this.opPinglun)
// console.log('item45456', this.opPinglun)
},
onEditorReady() {
// #ifdef MP-BAIDU
@@ -918,6 +983,9 @@
</script>
<style lang="scss" scoped>
.share{font-size: 28rpx; float: right; padding-bottom:20rpx ;
.per_mes_img{width: 40rpx; height: 40rpx; margin-left: 10rpx;}
}
.pingjiaBox {
margin-bottom: 20rpx;
}
@@ -1332,7 +1400,7 @@
}
.txt {
font-size: 24rpx;
font-size: 28rpx;
margin-top: 30rpx;
color: #666;
line-height: 50rpx;

View File

@@ -179,7 +179,7 @@
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: "https://www.nuttyreading.com/nuttyreading.apk",
href: this.$apkUrl,
title: "疯子读书",
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
imageUrl: "static/fengziIcon.jpg",
@@ -196,7 +196,7 @@
provider: "weixin",
scene: "WXSceneTimeline",
type: 0,
href: "https://www.nuttyreading.com/nuttyreading.apk",
href: this.$apkUrl,
title: "疯子读书",
summary: "我正在使用疯子读书提升自己,赶紧跟我一起来体验吧!",
imageUrl: "static/fengziIcon.jpg",