fanfan 8 months ago
parent b26d6d6882
commit 828ec700ea
  1. 5
      pages/news/recycling/detail.vue

@ -132,11 +132,10 @@
} }
}, },
onLoad(o) { onLoad(o) {
console.log(o.info)
let info = o.info ? JSON.parse(o.info) : uni.getStorageSync("getInfo"); let info = o.info ? JSON.parse(o.info) : uni.getStorageSync("getInfo");
uni.setStorageSync("getInfo",info)
if (info.content) { if (info.content) {
info.content = info.content.replace(/<img src=/g, '<img style="width: 100%; display:block" src=') info.content = info.content.replace(/<img src=/g, '<img style="width: 100%; display:block" src=')
console.log(info.content)
} }
this.info = info; this.info = info;
this.type = o.type; this.type = o.type;
@ -146,7 +145,7 @@
}, },
onShow() { onShow() {
if (uni.getStorageSync("userInfo").user_id) { if (uni.getStorageSync("userInfo").user_id) {
this.getList() this.getList()
this.userInfo = uni.getStorageSync("userInfo"); this.userInfo = uni.getStorageSync("userInfo");
this.isToken = true; this.isToken = true;
} else { } else {

Loading…
Cancel
Save