From 363f12e4530a137566dce431514a49a219caffcf Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期五, 07 四月 2023 14:08:57 +0800
Subject: [PATCH] bug修改

---
 miniprogram/pages/user/index.ts |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/miniprogram/pages/user/index.ts b/miniprogram/pages/user/index.ts
index 03ea24f..65a3ffc 100644
--- a/miniprogram/pages/user/index.ts
+++ b/miniprogram/pages/user/index.ts
@@ -4,7 +4,7 @@
 
 Page({
     data: {
-        role:'',
+        role:0,
         swcurrent: 0,
         isShow: false,
         userInfo: {},
@@ -20,10 +20,7 @@
 
 
     onLoad() {
-        this.setData({
-            role:wx.getStorageSync('role')
-        })
-        
+     
         wx.request({
             url: user.globalData.url+"/wx/login",
             data: {
@@ -42,12 +39,15 @@
                         method: "GET",
                         header: { 'token': wx.getStorageSync('token') },
                         success: (res) => {
-        
+                            this.setData({
+                                role:wx.getStorageSync('role')
+                            })
                             res.data.data.map(i => {
                                 if (i.photoStr != null) {
                                     i.photoStr = i.photoStr.split(",").map(i => user.globalData.imageUrl + "/img/" + i),
                                         this.data.images = i.photoStr
                                 }
+                                i.releaseTime = i.releaseTime.replace(/-/g,"/")
                             })
                             this.setData({
                                 causeList: res.data.data,
@@ -62,6 +62,8 @@
                 url: "pages/user/index"
             })
         }
+    
+        
        
     },
     toDetailedInformation(){

--
Gitblit v1.8.0