优化代码

This commit is contained in:
dengjie
2023-01-29 14:15:43 +08:00
parent 161f23f2c3
commit 09bbce1780
3 changed files with 32 additions and 15 deletions

View File

@@ -89,6 +89,7 @@
},
onLoad() {
this.getIdeasAndNeeds()
console.log(uni.getStorageSync('loginToken'));
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
// uni.navigateTo({
@@ -102,7 +103,7 @@
//获取创意发布
getIdeasAndNeeds() {
this.$apiServe.getIdeasAndNeeds(this.type).then(res => {
// console.log('获取创意发布&需求发布', res.data.data);
console.log('获取创意发布&需求发布', res.data.data);
let data = res.data.data
for (const item of data) {
item.pub_time = dateFormatXwDetail(item.pub_time)