|
|
|
@ -33,6 +33,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo> |
|
|
|
|
<home></home> |
|
|
|
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -52,11 +53,15 @@ |
|
|
|
|
} from '@/api/api.js'; |
|
|
|
|
import shareInfo from '@/components/shareInfo'; |
|
|
|
|
import home from '@/components/home'; |
|
|
|
|
import authorize from '@/components/Authorize'; |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import { configMap } from "@/utils"; |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
shareInfo, |
|
|
|
|
home, |
|
|
|
|
"jyf-parser": parser, |
|
|
|
|
authorize, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -68,8 +73,13 @@ |
|
|
|
|
tagStyle: { |
|
|
|
|
img: 'width:100%;display:block;' |
|
|
|
|
}, |
|
|
|
|
isAuto: false, //没有授权的不会自动授权 |
|
|
|
|
isShowAuth: false, //是否隐藏授权 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed:{ |
|
|
|
|
...configMap({margin_ico_switch: 0,margin_ico: '',site_name: '',share_pic: ''}, mapGetters(['isLogin','uid','viewColor'])), |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
|
*/ |
|
|
|
@ -93,19 +103,32 @@ |
|
|
|
|
methods: { |
|
|
|
|
getArticleOne: function() { |
|
|
|
|
let that = this; |
|
|
|
|
getArticleDetails(that.id).then(res => { |
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
|
title: res.data.title.substring(0, 7) + "..." |
|
|
|
|
if (that.isLogin === false) { |
|
|
|
|
// this.isAuto = true; |
|
|
|
|
// this.isShowAuth = true |
|
|
|
|
that.$util.Tips({ |
|
|
|
|
title: '未登录' |
|
|
|
|
}); |
|
|
|
|
that.$set(that, 'articleInfo', res.data); |
|
|
|
|
that.$set(that, 'store_info', res.data.store_info ? res.data.store_info : {}); |
|
|
|
|
that.content = res.data.content.content; |
|
|
|
|
// #ifdef H5 |
|
|
|
|
if (this.$wechat.isWeixin()) { |
|
|
|
|
this.setShareInfo(); |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
}); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.navigateBack({ |
|
|
|
|
delta: 1 |
|
|
|
|
}); |
|
|
|
|
}, 1000); |
|
|
|
|
}else{ |
|
|
|
|
getArticleDetails(that.id).then(res => { |
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
|
title: res.data.title.substring(0, 7) + "..." |
|
|
|
|
}); |
|
|
|
|
that.$set(that, 'articleInfo', res.data); |
|
|
|
|
that.$set(that, 'store_info', res.data.store_info ? res.data.store_info : {}); |
|
|
|
|
that.content = res.data.content.content; |
|
|
|
|
// #ifdef H5 |
|
|
|
|
if (this.$wechat.isWeixin()) { |
|
|
|
|
this.setShareInfo(); |
|
|
|
|
} |
|
|
|
|
// #endif |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
listenerActionSheet() { |
|
|
|
|
let that = this; |
|
|
|
|