进入品宣详情需要登录

master
santaner 1 year ago
parent c187bec574
commit 60e40eb2ba
  1. 1
      pages/goods_details/index.vue
  2. 47
      pages/news_details/index.vue

@ -589,6 +589,7 @@
},
onLoad(options) {
let that = this
alert(that.isLogin);
if (options.spid) {
app.globalData.spid = options.spid;
that.currSpid = options.spid

@ -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;

Loading…
Cancel
Save