Browse Source

Merge pull request 'feat: 支持不登录查看我的页面;' (#13) from fox into master

Reviewed-on: http://175.178.51.79:3000/hly/fission-star-applet-250304/pulls/13
master
Fox 4 weeks ago
parent
commit
efd50f83a0
4 changed files with 11 additions and 22 deletions
  1. +0
    -3
      api/model/center.js
  2. +0
    -5
      api/model/sharing.js
  3. +3
    -3
      mixins/list.js
  4. +8
    -11
      pages/index/center.vue

+ 0
- 3
api/model/center.js View File

@ -6,7 +6,6 @@ const api = {
getNotice: {
url: '/all_login/getNotice',
method: 'GET',
auth: true,
},
/**
* 获取动态列表
@ -14,7 +13,6 @@ const api = {
getNews: {
url: '/all_login/getNews',
method: 'GET',
auth: true,
},
/**
* 获取新闻动态详情的接口
@ -22,7 +20,6 @@ const api = {
getNewsById: {
url: '/all_login/getNewsById',
method: 'GET',
auth: true,
},
}

+ 0
- 5
api/model/sharing.js View File

@ -5,7 +5,6 @@ const api = {
getShareInfo: {
url: '/fen/getShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**
@ -14,7 +13,6 @@ const api = {
addLogShareInfo: {
url: '/fen/addLog',
method: 'POST',
auth: true,
limit : 500,
showLoading : true,
},
@ -44,7 +42,6 @@ const api = {
getVideoShareInfo: {
url: '/fen/getVideoShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**
@ -63,7 +60,6 @@ const api = {
getGroupShareInfo: {
url: '/fen/getGroupShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**
@ -82,7 +78,6 @@ const api = {
getArticleShareInfo: {
url: '/fen/getArticleShareInfo',
method: 'GET',
auth: true,
debounce: 500,
},
/**


+ 3
- 3
mixins/list.js View File

@ -47,9 +47,9 @@ export default {
*/
getData(queryParams){
if(this.authApi && !uni.getStorageSync('token')){
return
}
if(this.authApi && !uni.getStorageSync('token')){
return
}
return new Promise((success, error) => {
if(!this.mixinsListApi){


+ 8
- 11
pages/index/center.vue View File

@ -148,7 +148,7 @@ export default {
return {
notice: '',
mixinsListApi: 'getNews',
authApi : true,
authApi : false,
isLoggedIn : uni.getStorageSync('token'),
}
},
@ -159,12 +159,13 @@ export default {
},
},
onShow() {
this.isLoggedIn = uni.getStorageSync('token')
if(this.isLoggedIn){
this.$store.commit('getUserInfo')
this.$store.commit('getUserInfoVip')
this.fetchNotice()
}
this.fetchNotice()
this.isLoggedIn = uni.getStorageSync('token')
if(this.isLoggedIn){
this.$store.commit('getUserInfo')
this.$store.commit('getUserInfoVip')
}
},
methods: {
async fetchNotice() {
@ -190,10 +191,6 @@ export default {
return str.replace(/<.*?>/g, '')
},
goToNewsDetail(id) {
if (!this.isLoggedIn) {
this.goToLogin()
return
}
uni.navigateTo({
url: `/pages_order/mine/news?id=${id}`
})


Loading…
Cancel
Save